Buriedcode
Full Member level 6
Hi,
A few months ago I purchased the olimex SAM7S256 board, and I am just getting around to playing with it. Device: AT91SAM7S256
https://www.olimex.com/dev/sam7-p256.html
There are many code examples there, and on the web, and I have set up eclipse with YOGARTO tools/OpenOCD. Hardware dongles available for debugging are the JTAG wiggler, and an altera USB blaster. But before I start with those (I am scared I thought I would use atmels SAM-BA software.
Now, what I can't seem to understand is just 'how' to download code into the RAM (not flash) and run it from there. I thought this would be very handy for debugging, and would save the limited flash write cycles (100 for the SAM-BA boot loading software) as I'm a newbie and like to often load in simple code and see it run in real hardware.
I have tried using SAM-BA to do this. Whilst I can use both SAM-BA and SAM-PROG to program the flash with an LED blinking *.bin file (all works fine) if I send the bin file to the internal SRAM (starting address 0x200000) and using the TCL commend line, executing it ( go 0x200000). - This does nothing, except make SAM-BA screw up. - Is this because the compiled bin file has some information regarding its placement in the memory?
So, ultimately, using any hardware/software given above, how can I make sure my code is loaded into the internal SRAM rather than flash? I am fully aware it will be lost on power-off, but I prefer to do my tinkering in ram to save flash cycles, and when I have fully working code, then I can burn it to the flash.
Any advice would be welcome.
A few months ago I purchased the olimex SAM7S256 board, and I am just getting around to playing with it. Device: AT91SAM7S256
https://www.olimex.com/dev/sam7-p256.html
There are many code examples there, and on the web, and I have set up eclipse with YOGARTO tools/OpenOCD. Hardware dongles available for debugging are the JTAG wiggler, and an altera USB blaster. But before I start with those (I am scared I thought I would use atmels SAM-BA software.
Now, what I can't seem to understand is just 'how' to download code into the RAM (not flash) and run it from there. I thought this would be very handy for debugging, and would save the limited flash write cycles (100 for the SAM-BA boot loading software) as I'm a newbie and like to often load in simple code and see it run in real hardware.
I have tried using SAM-BA to do this. Whilst I can use both SAM-BA and SAM-PROG to program the flash with an LED blinking *.bin file (all works fine) if I send the bin file to the internal SRAM (starting address 0x200000) and using the TCL commend line, executing it ( go 0x200000). - This does nothing, except make SAM-BA screw up. - Is this because the compiled bin file has some information regarding its placement in the memory?
So, ultimately, using any hardware/software given above, how can I make sure my code is loaded into the internal SRAM rather than flash? I am fully aware it will be lost on power-off, but I prefer to do my tinkering in ram to save flash cycles, and when I have fully working code, then I can burn it to the flash.
Any advice would be welcome.