Provides device startup, system configuration, and linker script files. More...
Modules | |
Functions | |
Global Variables | |
Provides device startup, system configuration, and linker script files.
The system startup provides the followings features:
The flash and RAM allocation is defined by the linker scripts.
ARM GCC
The flash and RAM sections for the CPU are defined in the linker file: for example, 'cy8c4xx5.ld'.
Change the flash and RAM sizes by editing the macros value in the linker file:
ARM MDK
The flash and RAM sections for the CPU are defined in the linker file: for example, 'cy8c4xx5.sct'.
Change the flash and RAM sizes by editing the macros value in the linker file:
IAR
The flash and RAM sections for the CPU are defined in the linker files: for example, 'cy8c4xx5.icf'.
Change the flash and RAM sizes by editing the macros value in the linker file:
After a power-on-reset (POR), the boot process is handled by the boot code from the on-chip ROM that is always executed by the core. The boot code passes the control to the startup code located in flash.
The startup code performs the device initialization by a call to Reset_Handler(), which calls SystemInit(), and then calls the CMSIS-defined __PROGRAM_START().
The heap and stack configurations are defined by the linker scripts.
By default, the stack size is set to 0x0000400 and the heap size is allocated dynamically to the whole available free memory up to stack memory and it is set to the 0x00000080 (for ARM GCC and IAR compilers) as minimal value.
Change the stack size by editing the macro value in the linker file: ARM GCC
ARM MDK
IAR
The default interrupt handler functions are defined as weak functions to a dummy handler in the startup file. The naming convention for the interrupt handler names is <interrupt_name>_IRQHandler. A default interrupt handler can be overwritten in user code by defining the handler function using the same name. For example:
This process uses memory sections defined in the linker script. The vector table address (and the vector table itself) is defined in the startup files (e.g. startup_psoc4100sp.c). The code in these files defines the Reset_Handler, represents __VECTOR_TABLE as vector table in Flash and __RAM_VECTOR_TABLE represents this table in RAM.
The vector table is copied from Flash to RAM in Reset_Handler using memcpy().
Version | Changes | Reason for Change |
---|---|---|
2.1 | Added Cy_BootStatus() for PSoC4 HVMS/PA platform. Updated Reset_Handler() to support Default Handler for Boot-Up Status. | Major: Support for new devices. |
Updated SystemInit() function for PSoC4 HVMS/PA devices. Minor documentation updates. | ||
2.0 | Removed unused extern cy_delayFreqHz. | PDL major revision. |
1.10.2 | Update the paths to the code snippets. | PDL structure update. |
1.10.1 | Added support for PMG1S0, PMG1S1, PMG1S2, PMG1S3 devices. | New device support. |
Added missing __ICFEDIT_region symbols to the IAR linker scripts. | Improve ICF editor support. | |
1.10 | Updated Reset_Handler() for Cortex-M0 devices. | Implementation and documentation enhancements. |
Updated Reset_Handler() with IAR compiler support. | ||
Added low-level initialization routine for the RTOS-enabled applications. | ||
Updated system header with the vector table allocation. | ||
Set default system core clock frequency to 24 MHz. | ||
1.0 | Initial version |