Hello all,
I worked on SAM-BA a long time ago, and now I'm trying to use it again.
I developped a custom bootloader based on SAM-BA monitor for samc21_xplained_pro board. I add a CAN bus download protocol, but I also keep the SAM-BA protocol for RSS232 download. So, my bootloader is bigger than the initial one and then I change the Applicative start address to 0x4000 instead of 0x2000.
To have SAM-BA still working I have to change the "MONITOR_SIZE" define in the applet file flash_app_main.c
I follow procedure define in http://ww1.microchip.com/downloads/en/AppNotes/Atmel-42438-SAM-BA-Overview-and-Customization-Process_ApplicationNote_AT09423.pdf and http://ww1.microchip.com/downloads/en/AppNotes/00002565A.pdf
After doing that the applet crash (it is automatically loaded by SAM-BA (rev 2.18)).
So, I try to remove my modification and compile the applet without any modification. The applet still crashes. If I use the binary provide by ATMEL it is working well.
Then it seems that the binary file applet provide (C:\Program Files (x86)\Atmel\sam-ba_2.18\tcl_lib\samc21_xplained_pro) was not compile with the source code provide by ATMEL (C:\Program Files (x86)\Atmel\sam-ba_2.18\applets\samc21)
The only part of the procedure that I have not fully folowed is that I use the compiler rev 2013.11-24 instead of "Sourcery CodeBench Lite 2013.05-23 for ARM EABI" (I do not find file to install the good revision).
Does some have the same trouble and found a solution?
I could try to debug the applet using Atmel Studio but I do not found how to do it... (I'm not an expert on ATMEL Studio)
Regards
Olivier