mTower icon indicating copy to clipboard operation
mTower copied to clipboard

Impossible to flash M2351 device from Linux PC

Open tdrozdovsky opened this issue 5 years ago • 3 comments

Need to make a viable way to flash device from Linux

tdrozdovsky avatar Dec 26 '19 10:12 tdrozdovsky

I just started trying mTower but I stuck while I tried to find a way to flash from a Linux machine. Any progress on this? I'k actually trying the OpenOCD fork from Nuvoton github but without any success still.

danielRep avatar Apr 30 '21 10:04 danielRep

I am flashing using Windows, but earlier I did it for the test using a OpenOCD in Linux. There really were some inaccuracies that needed to be corrected (unfortunately I don't remember which ones now). I'm on vacation now, but in a week I can look, maybe I can tell you what I was doing. If you succeed earlier, write please how you did it to share the experience for everyone

tdrozdovsky avatar Apr 30 '21 10:04 tdrozdovsky

Ok, I was just able to flash and configure a development setup in Ubuntu 20.04.2 LTS. This is my setup:

Downloaded OpenOCD fork from Nuvoton repo: https://github.com/OpenNuvoton/OpenOCD-Nuvoton

After testing everything in a command line, I jumped to the front-end IDE that I am using to debug: Eclipse Embedded CDT (C/C++ Development Tools, formerly GNU MCU/ARM Eclipse) v6.1.2

At least for now, I am debugging only the secure part of mTower (mtower_s.bin). So, I create a new OpenOCD Debugging configuration with the following setup (I'll share some screenshots):

Debugger Tab: image Startup Tab: image

Until now, everything seems running smoothly.

PS: I'm using the eclipse as a front-end, but you can easily shift for your favorite setup to debug.

danielRep avatar Apr 30 '21 12:04 danielRep