Microcontrollers

Text SizeSmallLarge

FAQ

Welcome to Epson Semiconductor Support, where you can find information and helps relating to product supports.

We recommend you to make use of our FAQ or Search services before submitting an inquiry.


S1C17 Family development environment

gcc-01 Reduce the code size
Terget Version All versions
Question How can I reduce the code size as much as possible?
Answer Use single arrays as much as possible instead of multi dimensional arrays, because accessing multi dimensional arrays decreases code efficiency.

In addition, it is better to use pointers in case of passing structures to functions, or returning structures from functions,
In case noe to use pointer, the process to copy the whole structure is needed and the code size increases.
gcc-02 Access way to PSR
Terget Version All versions
Question How can PSR is read to know the current interrupt state?
Can PSR is modified directly?
Answer S1C17 does not have PSR accessing instructions.
To refer and modify PSR value,
PSR value is referred and modified after it is stored to stack memory by using int instruction, and then it is returned by using reti insturuction.

Some models have implemented PSR accessing instructions.
Please refer to each technical manuals.

Example:

PSR example PSR example

Page Top