2019-06-25 10:52 AM
Hello,
I am very very new with STM32 and I am doing a challenge. I am working on a Macbook Air
I have at my disposal a
The B-L072Z-LRWAN1 Discovery kit
A st-link
A j-link
My goal is to build a Gateway-repeater with BL072Z-LRWAN decovery kit, with the following instruction
For this, I already completed some steps successfuly (with help), but we did do not find how to flash the code into my BL072Z-LRWAN discovery kit.
Here are the steps
After the Make I got a new folder named ~/Download/LoRaWanRelay-master/build with a lot of different files, with some extention like .lst and .o and .d
Now, I have to connect my discovery code and flush the code into the board and unfortunately, I
The Make file is big but I past the cod here as a text file here
A colleague suggested me to add this
#######################################
flash the chip
#######################################
flash:
openocd -d0 -f stm32f3.cfg -c “init;reset halt;stm32f3x mass_erase 0;flash write_image build/oibus-mini-mikrobus-stm32-firmware.hex;reset run;shutdown�?
Nut we could not test and it would be great to have you point of and advices
Would it be possible to have some. instruction?
Many, many thank for your help!
Cheers
Pierrot
2019-06-25 11:24 AM
It seam I need to use this
but how to connect, and how to flash ? :smirking_face:
and it look to have an micro usb connectot with the text "USB STLINK". May it be integrated?
2019-06-25 11:57 AM
I observed an interresting things. I connected the USB cable to the microUSB connector of the B-L072Z-LRWAN1 discovery kit
It was like a USB stick, it maped the board and I can see two files
The flashing process would be to simply copy/past files?
2019-06-25 12:13 PM
The Discovery board has a built-in ST-LINK, so the external one is not required.
The mbed drive should accept a firmware binary in the form FW.BIN, in Windows a drag-n-drop operation, or COPY from the console.
It will not accept .HEX or .ELF files, so those would need to be converted with objcopy (as I recall)
2019-06-25 01:16 PM
Dear Clive,
Thank a lot for your reply!!!
Then If I understand, after I ran the command
make clean all
a folder named 'build' is created. In that folder there is a lot of files witht he extension .o, .lst, .d, but I just observed 4 files:
MiniMouse.bin
MiniMouse.elf
MiniMouse.hex
MiniMouse.map
What's .map, .elf and .hex ?
Then as you write, I should simply copy the bin file to my discovery kit board? ( when i connect my USB cable, my Macbook Air mount a drive, as a USB stick.
Then unmount it, add the battery, and the board works???
(I may have a other question, if above is correct)
2019-06-25 01:37 PM
The .MAP file is a ASCII, nee human-readable, report from the linker about symbols, names, and locations.
The .ELF is the primary output of the linker, it is an Object File Format, containing your binary code/data, and a lot of metadata about locations and symbols, etc.
The .HEX file is an ASCII representation of the code/data in memory, it provides address information, can be sparse (have holes, and describe multiple regions of memory), is verbose (about 2.5x larger than necessary) and is in a form that can be emailed.
The .BIN file is a binary (byte for byte) representation of code/data in memory, these are the values written into the memory and read and processed by the MCU. The address is assumed to be the base of flash, and is a linear/continuous image of memory
You should be able copy the MiniMouse.bin file to the mbed faux drive
2019-06-30 12:47 PM
Thank a lot Clive.
I am going to test that tomorrow or Tuesday.
I have another question but I will open a new post
Cheers
Pierre