Can't get NUTOS into Olimex SAM7 board through OCD

I installed Ethernut (4.6.3). Then I compiled events demo which created events.elf. I tried to run a load_image to get it in, and that resulted in the following output:

10312 byte written at address 0x00000000

236 byte written at address 0x00002848

Is this even correct? I would expect it to go into 0x200000 (RAM) or 0x100000 (FLASH)…

Now, I set PC to 0 and execute resume command. But it does not work. I don’t even know where the main() function is in the memory. I looked at the events.lst file and tried looking for its signature in the memory, but could not find it. Basically, I do not know what got dumped into the memory.

I have tried all this with another (non-NUTOS) example and it all worked fine. So, the flow should be fine.

How does one go about figuring this out? I am a beginner with ARM etc. I guess I kindof hoped this would be much easier, and that I would not have to know all the MCU details, tool details etc… but now it seems I will have to dig in a lot deeper…

Thanks in advance,

Ivan

I managed to get events example into the flash through SAM-BA v2.8:

  1. ARM-USB-OCD adapter has to be unplugged

  2. The serial port jumpers have to be in position DRXD/TRXD (this is both for samba and since the NUT/OS uses DBGU for its stdio)

  3. Uploaded the bin file into flash

  4. Set the UNVM setting to boot from flash

On next reset the terminal window started showing data coming out.

I still haven’t figured out how to upload to ram and debug with ARM-USB-OCD. I seem to send data in, but cannot execute the code. Maybe I need to change the linker settings somehow?