for a faster programming in developing I am writing a script resp. batch file, which calls the corresponding functions/commands of J-link in the CMD window.
I have J-Flash software V.6.98c installed and I use a J-LINK plus
The controller I use is a SAMD51N19A, there is no external flash or ram connected to it.
With this skript I do
-resetting the fuse bits
-erasing the device from 0x00000 to 0x7FFFF
then programming
-setting the fuse bits
When I do this, i get the error
"Error: failed to prepare RAMCode using RAM
Error while determining flash info (Bank @ 0x04000000)
ERROR: Erase retunred with error code - 1
The error also comes up when I try to erase the "whole" RAM, resp. I dont use the erase with the range indication.
If I do the script without the erase command, it works. But I need to erase it first (I guess this should be done...)
Anyway, the error also comes up, when I use the j-flash - software itself in "Target => Manual Programming => Erase Chip"
I read a lot in this forum of people having similar problems. But I could not figure out any solution that would work for my problem.
Has anybody an idea how to eliminate this error?
Here is a part of my bat-file:
echo connect > script.jlink
echo r >> script.jlink
echo w4 0x00804000 0xFE9A9235 >> script.jlink
echo w4 0x00804004 0xAEECFF80 >> script.jlink
echo erase [0x000000, 0x7FFFF]>> script.jlink
echo loadfile "%hexfile%" >> script.jlink
echo w4 0x00804000 0xEE9A9234 >> script.jlink
echo w4 0x00804004 0xAEECFF80 >> script.jlink
echo r >> script.jlink
echo g >> script.jlink
echo q >> script.jlink
:FLASH
jlink.exe -device ATSAMD51N19 -if SWD -speed 4000 -CommanderScript script.jlink -autoconnect 1 -ExitOnError 0
IF %errorlevel% == 0 GOTO PASS
IF %errorlevel% NEQ 0 GOTO ERROR
I have J-Flash software V.6.98c installed and I use a J-LINK plus
The controller I use is a SAMD51N19A, there is no external flash or ram connected to it.
With this skript I do
-resetting the fuse bits
-erasing the device from 0x00000 to 0x7FFFF
then programming
-setting the fuse bits
When I do this, i get the error
"Error: failed to prepare RAMCode using RAM
Error while determining flash info (Bank @ 0x04000000)
ERROR: Erase retunred with error code - 1
The error also comes up when I try to erase the "whole" RAM, resp. I dont use the erase with the range indication.
If I do the script without the erase command, it works. But I need to erase it first (I guess this should be done...)
Anyway, the error also comes up, when I use the j-flash - software itself in "Target => Manual Programming => Erase Chip"
I read a lot in this forum of people having similar problems. But I could not figure out any solution that would work for my problem.
Has anybody an idea how to eliminate this error?
Here is a part of my bat-file:
echo connect > script.jlink
echo r >> script.jlink
echo w4 0x00804000 0xFE9A9235 >> script.jlink
echo w4 0x00804004 0xAEECFF80 >> script.jlink
echo erase [0x000000, 0x7FFFF]>> script.jlink
echo loadfile "%hexfile%" >> script.jlink
echo w4 0x00804000 0xEE9A9234 >> script.jlink
echo w4 0x00804004 0xAEECFF80 >> script.jlink
echo r >> script.jlink
echo g >> script.jlink
echo q >> script.jlink
:FLASH
jlink.exe -device ATSAMD51N19 -if SWD -speed 4000 -CommanderScript script.jlink -autoconnect 1 -ExitOnError 0
IF %errorlevel% == 0 GOTO PASS
IF %errorlevel% NEQ 0 GOTO ERROR