cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

Anonymous
Not applicable

Hello, I am ramping up on PSoC4 BLE using PSoC Creator with gnu toolchain (the default).  I generated a blink project using TCPWM, and reading the auto-generated code to understand how the device boots.   I just read AN60616 and currently am reading AN73854, but so far do not understand how the function initialize_psoc(), which configures all registers and sets up clocking, etc is called for the GNU case.  Can anyone shed some light for me please?

0 Likes
Reply
3 Replies
Esteemed Contributor II

In cyboot the configuration data get stored into the configuration registers. Choices in the system tab depending on chip used allow for compressed, uncompressed and DMA transfer. All this is done before main() is called. Cyboot does a rather complex job as starting the clocks up to the defined frequencies and setting the dividers, checking the main clock sources for proper running, setting up the components and lastly setting the IO-pins from hi-z to the defined state and drive modes. All this is done automatically and has nothing to do with your GCC toolchain. Just pre-written Cypress software.

   

 

   

Bob

0 Likes
Reply
Esteemed Contributor

You will find this (after a build) in Cm0Start.c -

   

 

   

/*******************************************************************************
* Function Name: Reset
********************************************************************************
*
* Summary:
*  This function handles the reset interrupt for the RVDS/MDK toolchains.
*  This is the first bit of code that is executed at startup.
*
* Parameters:
*  None
*
* Return:
*  None
*

   

 

   

Regards, Dana.

0 Likes
Reply
Anonymous
Not applicable

Thank you Bob and Dana, I was able to answer my own question by looking up the documentation on the constructor gcc attribute, and setting a breakpoint in initialize_psoc() in the debugger.

0 Likes
Reply