GDB not writing to flash

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GDB not writing to flash

658 Views
BillTheBiker
Contributor III

I am trying to build the lwip SDK example but with a slight twist.  I have created two static library projects one for FreeRTOS and one for LWIP.  I modified the lwip tcp echo program to point to the libraries instead of using the single example project.  This is so I can then drop the libraries into my main project.  Everything works as expected, but when I go to debug, the debugger does not vector to main().  This is because for some reason the sectors are not written.  I have output of the debug console on the project I am testing and my own main project (which debugs fine).  These are the critical indications as to the problem:

From the test project:

Writing 85984 bytes to address 0x00000000 in Flash
Sectors written: 0, unchanged: 3, total: 3
Erased/Wrote sector 0-2 with 85984 bytes in 165msec

From my project which works fine:

Writing 325836 bytes to address 0x00000000 in Flash
00004000 done 5% (16384 out of 325836)
00008000 done 10% (32768 out of 325836)
0000C000 done 15% (49152 out of 325836)
00010000 done 20% (65536 out of 325836)
00014000 done 25% (81920 out of 325836)
00018000 done 30% (98304 out of 325836)
(100) at 00018000: 229376 bytes - 327680/325836
Sectors written: 3, unchanged: 7, total: 10
Erased/Wrote sector 0-9 with 325836 bytes in 1155msec

The map file looks fine, all the source is placed correctly.  Any ideas?  I attached the test project in case anyone is interested in helping out here...

Many thanks

0 Kudos
2 Replies

586 Views
BillTheBiker
Contributor III

Further information on this condition is in the title bar of MCUXpresso is the message "source not found"

pastedImage_1.png

I disassembled the .axf file and all the functions are placed in .text.  What is going on??

0 Kudos

586 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello William,

Do you have an optimization level enabled? This option is seen if you right click in the project -> Properties -> Settings -> Optimization

pastedImage_1.png

Is strange that the file size is different so something in the construction in the and the map file should be different,  would be possible to share both map files?

Best Regards,

Alexis Andalon

0 Kudos