AnsweredAssumed Answered

CM408 Boot modes and FLASH erase fail

Question asked by turman on Apr 21, 2017
Latest reply on Apr 28, 2017 by turman

Hi, I would like to ask your opinion where I found problems, but I probably did not understand something.
Foreword: I work with GCC and I have developed a board with CM408 optimized for my needs as well as some software utilities needed for the development (LDR utility, RAM and FLASH UPLOADER), used baud rate for the UART is 115200.
If I build a simple code located in RAM (0x10000000) with a binary size less then 15300 bytes all work fine but if this size is greather then this value (adding more code) doesn't work (No sys fault is generated). But if I load the same larger code in the FLASH (0x18001000) all work fine!
In the first case I restart the system with boot by UART then I will send the built LDR file (my test code), while in the second case (FLASH usage), first I will send CM40zUARTFlashProgrammer.ldr (by ADI) and then I will send my LDR file following its specific protocol.
Attached are available used LDR and MAP files used for the test in RAM.
Also I found another problem with FLASH: at the moment I don't use security FLASH area (first 4096 bytes) and I leave this portion cleared (all FF). The problem happen when I try to erase the FLASH with the command 0xBAB3D048 (after boot from UART and autobaud etc.etc.), this command does not do pretty much anything if it found the first FLASH sector blank!
In this mode if I want to erase the FLASH, as first operation I must write something at first FLASH location and then I can use bulk erase.

I have read the user manual several times but did not find the answers I am looking for, I'm probably tired or I'm blind. I hope someone can help me, work with the GCC has big obstacles, but also IAR's, proposed development tool, costs one eye!
Thanks in advance for your help.

Attachments

Outcomes