I’m just trying out STM32Duino and so I cloned https://github.com/rogerclarkmelbourne/ … _STM32.git and checked out the development branch.
I twiddled STM32F1/platform.txt to change ‘runtime.tools.arm-none-eabi-gcc.path’ to point to my build environment.
The build worked but flashing didn’t – it wouldn’t run GDB.
In the end I modified platform.txt like so
tools.bmp_upload.cmd=/opt/local/bin/arm-none-eabi-gdb
tools.bmp_upload.upload.pattern="{cmd}" -cd "{build.path}" -b {upload.speed} {upload.verbose} -ex "set debug remote 0" -ex "set target-async off" -ex "set remotetimeout 60" -ex "set mem inaccessible-by-default off" -ex "set confirm off" -ex "set height 0" -ex "target extended-remote {serial.port}" -ex "monitor swdp_scan" -ex "attach 1" -ex "x/wx 0x8000004" -ex "monitor erase_mass" -ex "echo 0x8000004 expect 0xffffffff after erase\n" -ex "x/wx 0x8000004" -ex "file {build.project_name}.elf" -ex "load" -ex "x/wx 0x08000004" -ex "tbreak main" -ex "run" -ex "echo \n\n\nUpload finished!" -ex "quit"
Or try finding the thread about the BMP and post there, as Rick normally responds to that thread
Is there a canonical way to point Arduino to the tool chain, or is editing platform.txt it?
Is there a canonical way to point Arduino to the tool chain, or is editing platform.txt it?
I didn’t originally because I have arm-none-eabi-gcc v5.1.0 in my path – I downloaded 4.8 from Launchpad and put it in another directory because the boot loader repo suggests it doesn’t work on any newer version.
I see you are running Linux
Rick, who added BMP support also uses Linux, so it does work on some distro’s , but perhaps not yours.
Can you post any more questions to this thread
http://www.stm32duino.com/viewtopic.php?t=122
(If I get time I would move the thread myself, but I don’t want to break the other thread as its an important source of information)
I’ll take a look at that thread, thanks.
It may not have been tested on OSX
I’m just trying out STM32Duino and so I cloned https://github.com/rogerclarkmelbourne/ … _STM32.git and checked out the development branch.
I twiddled STM32F1/platform.txt to change ‘runtime.tools.arm-none-eabi-gcc.path’ to point to my build environment.
I’m just trying out STM32Duino and so I cloned https://github.com/rogerclarkmelbourne/ … _STM32.git and checked out the development branch.
I twiddled STM32F1/platform.txt to change ‘runtime.tools.arm-none-eabi-gcc.path’ to point to my build environment.
Things to consider:
o Did you install the arm-none-eabi-g++ toolchain by using the Board Manager and then installing either the Arduino Zero or Due?
o Are you using a BMP you built yourself or one you purchased? If you built it your self have you tested it by connecting to it using arm-none-eabi-gdb on the command line and then interacting with it?
o If you have successfully used arm-none-eabi-gdb + your BMP device, have you selected the proper /dev/ttyXXXX for your os? The BMP device will show up as two different TTY devices. You want to set the PORT to the first of these devices in the Arduino IDE, the IDE uses the port you selected as the debug connection ( target extended-remote /dev/ttyXXXX ) I don’t know what the proper OS X ttyname is.
o If it is still not working, I noticed you said you checked out the development branch, I just tried the master branch and that works fine. Does the master branch work for you?
o The target device you are trying to program, does it have the bootloader on it? This will disable the debug ports and prevent you from using SWD to program the device. You have to change the BOOT0 jumper to “HI” to override this setting. When you select the board in the Arduino IDE, you must select BMP when you compile. That sets the macro flag -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG which keeps the SWD debug pins active. After you have regained access to the debug pins you can move the BOOT0 pin back to “Low” and then toggle the power on your target board.