Closed klerone closed 3 years ago
Well, I finally decided to try it and run into problems and hope someone can help me to figure out, let me explain.
I successfully connected the MCU to JLink OB and loaded code 2 times, the first time I did not enable the #define PIN_MAP_COMPACT and uploaded the code to blink an LED (nothing happened), then I recompiled the code and uploaded, this time my LED blink and I was happy, then wanted to PWM that LED but I found that could not connect any more.
Have been more than a week since then, I looked for information and even bought a DAP-Link to try if the problem was by clone J-Link, it is not. using openOCD I get an error message and points that the SWD pins maybe disable, my MCU is obviously alive and working because if I power it up the LED blink with the last code i uploaded.
I am not an expert developer, mostly a hobbyist but I am diving in the code to find if there is any line that disabled the SWD pins.
If someone can help me I want to know how can I manage to upload code again, or erase the MCU to recover it. My pourpose is to learn what happened and if can be undone
This was my settings in the Arduino IDE:
Hi,
can you see your J-Link in Atmel/Microchip Studio listed under Tools? If yes, have a look if you can access the chip from there.
Well, I found the solution to my problem.
Then answer to my first question in case someone else come to the same: Yes, it is possible to upload .bin file from the Arduino IDE using and external software and is not necessary to upload a bootloader before doing that.
In my case I compile the code in Arduino IDE, then in the Sketch menu click generate the bin file, using J-Flash Lite can upload the code easily even with a clone J-Link.
I have been trying to upload the code using openOCD with a DapLink without success.
Hello @mattairtech
I have not experience with Atmel ARM micro Controllers but I have been using Arduino and ATMEGAs, I bought a SAMD11C14 for learning purpose. I do not have an Atmel-ICE, I have a J-Link OB and it works well with STM32, so want to use it to download the code and do not use the boot-loader to save space.
My Question is: Do I need to upload first a boot-loader file before uploading Arduino code generated .bin file or just upload the .bin file and the code will run?