Skip to main content
PAmey.3
Associate II
June 25, 2019
Question

How to flash code into The B-L072Z-LRWAN1 Discovery kit

  • June 25, 2019
  • 6 replies
  • 1644 views

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

  1. We dowloaded this (for Mac) to ~/Download
  2. I dowloaded this and copy the files to /usr/local/gcc_arm
  3. I edited ~/.profile and added the line
  4. export PATH=$PATH:/usr/local/gcc_arm/gcc-arm-none-eabi-8-2018-q4/bin
  5. I cd ~/Download/LoRaWanRelay-master
  6. I lunched Make from ~/Download/LoRaWanRelay-master
  7. All went fine.

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

This topic has been closed for replies.

6 replies

PAmey.3
PAmey.3Author
Associate II
June 25, 2019

It seam I need to use this0690X000008jC0HQAU.jpg

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?

PAmey.3
PAmey.3Author
Associate II
June 25, 2019

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

  1. DETAILS.TXT
  2. MBED.HTM

The flashing process would be to simply copy/past files?

Tesla DeLorean
Guru
June 25, 2019

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)

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
PAmey.3
PAmey.3Author
Associate II
June 25, 2019

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)