Closed jeromeDms closed 2 years ago
Hi It is hard to shrink the ISP USB code into 2KB. Please select another M032 part with 4K LDROM.
Our hardware is already done using the M032FC1AE. I then plan to do as follow, please confirm is feasible to you :
Is this correct to you ?
Hi,
It's correct. You can find an similar example at below link https://www.nuvoton.com/tool-and-software/application-software/example-code/
key word M031 to find this sample "M031 Multi-Application Jump"
Great ! I just checked this example. It actually boots from LDRom and jump to App1 or App2 depending on user choice.
Is there a way to always boot from App1 and decide to jump to App2 by reading a flag at a fixed address where both App1 and App2 could access ?
In other words, how can I reserve one word at a fixed address and make sure the App will not be linked to this address ?
Please refer the Nuvoton NuMicro ICP Prgrammer User Guide.pdf which guide you to boot from APROM by User Configuration Setting.
It is dependent on your application to reserve one word on the flash. Due to flash character, it can be program from 1 to 0 but unable change from 0 to 1 if not erase. If you want change the flag frequently, please note it.
thanks !
One more question. We want to add a flag at a fixed memory address to mention if the app is valid or not (The bootloader will read that flag and decide to jump to application if the flag is valid).
I can see :
/----------------------------------------------------------------------------------------------------------/ / Define Base Address / /----------------------------------------------------------------------------------------------------------/
Can we use FMC_USER_CONFIG_0 to store this flag ? Is there a user part in those registers where we can store a flag ?
Both the app and bootloader must be able to read/write this area, and I do not see anything in the data sheets that could prevent us from using this flash area to store the flag. thanks
Due to the USER CONFIG store the important information for booting, it is not preferred to store the flag over there. You can try to save the flag at data flash area.
Ok thanks for the answer. I'm not using LDRom to store my bootloader. I'll then use this LDROM to write my flag.
I assume here the LDROM can be read/write from the program running in APROM. Is this true ? Thanks
Yes. You can use FMC_Read(...) function or refer BSP SampleCode/StdDriver/FMC_RW sample for it.
thanks for your support
Hi I'm using M032FC1AE with LDRom size of 2K only. I tried to compile ISP USB Mass storage example but the resulting code size is 3.8K, or 3.1K when optimized for size. Is there something that can be improved in this code to fit into 2K ? On the other hand, what ISP app could fit into 2K ? Thanks.