Hi NXP community
I am using the power library from the SDK_2.5.0_LPCXpresso54102.zip\devices\LPC54102\iar\iar_lib_power.a. The library crashes when I step over the function POWER_SetVoltageForFreq(LPC54XXX_F_CORE). This function is used in our bootmonior. Our bootmonitor does not initialize variables using the c-runtime __iar_program_start. We try to avoid using the c-runtime to reduce flash memory footprint for our bootmonitor.
We have observed a similar behavior with the lpc-spifi-lib provided with source code from NXP - see attachment. We have found that some crucial variables are not properly initialized when we do not use the c-runtime. The source code needs to be modified to properly initilize variables to allow usage of the library without relying on the c-runtime to initialize variables. Attached is the source code modification I have implemented in the lpc-spifi-lib to give you an idea what I am talking about.
I need an update to the power library (SDK_2.5.0_LPCXpresso54102.zip\devices\LPC54102\iar\iar_lib_power.a) from NXP to solve my "crash" problem. Could NXP provide me with a fixed power library or provide me with the source code to this power library?
Many Thanks
Dani
Hi Daniel Gull,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
As I know, the source code of iar_lib_power.a has no plan to be published now.
During the MCU startup, __iar_program_start will initialize static and global variables, that is, zero-initialized variables are cleared and the values of other initialized variables are copied from ROM to RAM memory.
It's a key step prior to calling the main(), so I don't it's not advisable to remove the __iar_program_start to save flash space.
I'd highly recommend you to consider this risk of the operation.
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Jeremy
I understand that you recommend not to remove __iar_program_start.
My boundary conditions however do not allow me to work with __iar_program_start.
I need a power library that allows this me to work without __iar_program_start.
As you can see in my attachments it is possible to do this with the corresponding measures in coding and I am sure this would benefit others as well. I would like NXP to modify the power library to allow me to use it without having to use __iar_program_start. If this is not possible, then we may need to step out of buying this product and consider other alternatives.
Dani
Hi Daniel Gull,
Thanks for your reply.
Maybe you can give a try to contact local DFAE or FAE for requesting the source code of iar_lib_power. a, I think it needs to sign NDA.
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Jeremy
Can you direct me to my local DFAE or FAE? Who is my local DFAE or FAE?
Dani
Hi Daniel Gull,
Thanks for your reply.
You can find the DFAE contact information via the link.
https://www.nxp.com/support/sample-buy/distributor-network:DISTRIBUTORS#ARMENIA
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------