Thanks, MG
Click for Google search The first results looks promising.
Ray
I want to use makefile + SPL, *.LD, *.S. Nothing else and of course dfu-util.exe.
For example: I have main.c for simple LED blink and makefile (plus SPL, LD and S). No Arduino library or source, no Arduino IDE. Command “make” generate hex file. This file I uploading with st-link to MCU and LED blinking. What I must make when I can upload this hex file with DFU util. Burn Arduino-stm32 bootloader and? Edit LD script (set right start address – skip bootloader)? Anything else?
Thanks
http://help.eclipse.org/kepler/index.js … unning.htm
Or you could create a custom makefile for your project instead of using the one eclipse auto-generates.
LD script is must be modified – ROM (rx) : ORIGIN = 0x08002000…
After make hex respectively binary (-Obinary) it is necessarily make MCU reset (reset.py – through VCP).
Then I can upload binary to MCU (dfu-util -a 2 -d 1eaf:0003 -D xxx.bin).
It is working.
Bud there is a small problem. The part of the main program must have VCP init because after upload binary to MCU, MCU (USB) stay in Maple DFU mode and I can’t make software restart when I can upload another firmware…
But, im strugging to get this working.
Trouble is I dont know the arguments to pass to the dfu util… in mac.
Ive got eclipse mostly working now but I cant upload using the normal arduino serial method and I cant time the manual reset correctly. As manually resetting turns off the board and hides the serial port.
So , what arguments do i put in?
Here is the manual page for it:
http://dfu-util.sourceforge.net/dfu-util.1.html
I assume that you are using it with the maple bootloader (https://github.com/rogerclarkmelbourne/ … bootloader)
Then you need to
1. pass VID:PID of the USB device using “-d” option
2. pass alternate settings using “-a”. There are three alternate settings available in the bootloader which points to three different locations.
0: RAM
1: Flash 0x8005000
2: Flash 0x8002000
The choice of these depends on where your user application is compiled at.
3. pass the user application binary file you want to download using “-D”
Then you need to manual reset it as I believe the bootloader goes into dfuMANIFEST-WAIT-RESET state (I might be wrong here).
I discovered that for some reason it was trying to trigger the WIN version of the dfu… And i couldnt find an option that forced it to use macosx, so i basically copied the MAC files into the win dir…
Kinda worked, managed to get it to upload. But I have a new problem… I think its either corrupting the upload or the builder in eclipse is compiling a damaged file. As once its uploaded. The board doesnt run the program or is crashed. And i even have trouble with getting serial to see it after this.
Reuploading using DFU from the arduino IDE fixes this. I assume corrects the bootloader or programme.
Is eclipse system getting flagged as windows and performing bad builds or something?
I really want to get this to work…
I discovered that for some reason it was trying to trigger the WIN version of the dfu… And i couldnt find an option that forced it to use macosx, so i basically copied the MAC files into the win dir…
Kinda worked, managed to get it to upload. But I have a new problem… I think its either corrupting the upload or the builder in eclipse is compiling a damaged file. As once its uploaded. The board doesnt run the program or is crashed. And i even have trouble with getting serial to see it after this.
Reuploading using DFU from the arduino IDE fixes this. I assume corrects the bootloader or programme.
Is eclipse system getting flagged as windows and performing bad builds or something?
I really want to get this to work…
if i upload from eclipse(sloeber) i get it to upload, but doesnt seem to run. And the serial port disappears as if its crashed or something…
So i assumed that eclipse is building a bad binary… However. i uploaded blink through Eclipse and it ran fine.
Really confusing.
i only have a few libraries included.
#include <Adafruit_NeoPixel.h>
#include <ThreadController.h>
Maybe eclipse is reading from a different library or something. its rather confusing me.

