Big STM32 boards topic

WB is White Board?
So it now is brown? :wink:

@bluejedi

How you programming your nodes? Usb? I wanna use a JLink. For the Blinkexample it goes.

WB = Workbench

Greets

USB (DFU) with stm32duino bootloader.
Or use UART with USB to Serial on PA9/PA10.
Haven’t used ST-LINK for sketch yet because I can use USB.

Note:
When using stm32duino and USB (DFU), upload sketch via serial or ST-Link will overwrite the stmduino bootloader again.

Are you using PlatformIO?

Not ST-Link. JLink (SEGGER).

Nope. I use Arduino-IDE.

Just curious, are you using the official ST STM32 tools for Arduino and ‘Generic STMF103 series’ for the board (‘STM32 Cores by ST-Microelectronics’)?

In our comunity (little) the Master of Desaster want to use a full? IDE like Visual Studio.

But it stuck some times to create the HAL. We use MATRIX to configure the ground configuration for the BP.

I am NOT a developer! Most of the Things i doesen`t understand.

I want to use the existing codes/sketches and try to adapt them to my needs.

Nope. At my PC (LINUX) i create a own user for fiddeling with MCU at 32 bit. Like the BP or the Feather M0.

I use the code from @tomtor

Installing his code from Git.

The PlatformIO IDE is a plugin for the Atom and Visual Studio Code (vscode) code editors. Run on Windows, Linux and OSX. But probably more difficult if you are not a developer.

Here in the UK I purchased two of the '303 versions from BSFrance and they arrived just two days later! I cloned their github repo https://github.com/BSFrance/LoRaM3-D_templates and the code built with no errors using Atollic Studio - next step is to add some LoRaWAN code…
IMG_20180412_124617838

4 Likes

I see you have ST-Link connected. Are you using the Arduino stack? Have you tried to upload a sketch via USB (DFU) already?

No. I cloned the BSFrance github repo: https://github.com/BSFrance/BSFrance-stm32.git into my Arduino hardware folder and the boards show up OK, but I struggled with path length when trying to compile in Arduino on Windows and a failure to link in Arduino on a Mac - if anyone knows of a cure for
“…
arm-none-eabi-gcc: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found
…”
Atollic is STM recommended and I think is a good STM32 IDE that is free to use for any STM32 MCU. It links easily with ST-Link, so I am partly happy :slight_smile: as there is no Mac installer.

Seems like the arduino arm compiler can’t find the shared lib.

This is a search on (linux) : gcc version 5.4.1 20160919 (gcc-arm-none-eabi-5_4-2016q3)

bingo@X200-1 ~/arm/arm-gcc/arm-gcc $ ls -lR | grep  liblto_plugin.so 
lrwxrwxrwx 1 bingo bingo       22 Sep 26  2016 liblto_plugin.so -> liblto_plugin.so.0.0.0
lrwxrwxrwx 1 bingo bingo       22 Sep 26  2016 liblto_plugin.so.0 -> liblto_plugin.so.0.0.0
-rwxr-xr-x 1 bingo bingo    73268 Sep 26  2016 liblto_plugin.so.0.0.0
bingo@X200-1 ~/arm/arm-gcc/arm-gcc $ 

/Bingo

1 Like

I have not ran into path length issues on windows yet.(No Mac here.)
When/where do you have path issues?

Hi @bluejedi - I thought that my problems might be due to compile line length -
<>
Detecting libraries used…
“C:\Arduino\hardware\BSFrance-stm32/stm32/tools/win/gcc/bin/arm-none-eabi-g++” -mcpu=cortex-m3 -DF_CPU=72000000L -mthumb -DSTM32GENERIC -DRAM_LENGTH=20472 -DFLASH_LENGTH=126976 -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf -w -x c++ -E -CC -DSTM32F1 -DARDUINO=10805 -DARDUINO_LORAM3_D_F103CB -DARDUINO_ARCH_STM32 -DSTM32F103CB -DSTM32F1 -DHSE_VALUE=8000000 -DVECT_TAB_OFFSET=0x1000 -DMENU_USB_SERIAL -DMENU_SERIAL_AUTO=SerialUSB -DMENU_DEBUG_SWD “-IC:\Arduino\hardware\BSFrance-stm32\stm32\cores\arduino/stm32” “-IC:\Arduino\hardware\BSFrance-stm32\stm32\cores\arduino/usb” “-IC:\Arduino\hardware\BSFrance-stm32\stm32\system/CMSIS” “-IC:\Arduino\hardware\BSFrance-stm32\stm32\system/STM32F1/CMSIS_Inc” “-IC:\Arduino\hardware\BSFrance-stm32\stm32\system/STM32F1/CMSIS_Src” “-IC:\Arduino\hardware\BSFrance-stm32\stm32\system/STM32F1/HAL_Inc” “-IC:\Arduino\hardware\BSFrance-stm32\stm32\system/STM32F1/HAL_Src” “-IC:\Arduino\hardware\BSFrance-stm32\stm32\system/STM32F1/stm32_chip” “-IC:\Arduino\hardware\BSFrance-stm32\stm32\cores\arduino” “-IC:\Arduino\hardware\BSFrance-stm32\stm32\variants\LORAM3_D_F103CB” “C:\Users\nicbk\AppData\Local\Temp\arduino_build_508715\sketch\BSFrance-303-LoRaSpreadRangeTest.ino.cpp” -o “nul”
Generating function prototypes…
“C:\Arduino\hardware\BSFrance-stm32/stm32/tools/win/gcc/bin/arm-none-eabi-g++” -mcpu=cortex-m3 -DF_CPU=72000000L -mthumb -DSTM32GENERIC -DRAM_LENGTH=20472 -DFLASH_LENGTH=126976 -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf -w -x c++ -E -CC -DSTM32F1 -DARDUINO=10805 -DARDUINO_LORAM3_D_F103CB -DARDUINO_ARCH_STM32 -DSTM32F103CB -DSTM32F1 -DHSE_VALUE=8000000 -DVECT_TAB_OFFSET=0x1000 -DMENU_USB_SERIAL -DMENU_SERIAL_AUTO=SerialUSB -DMENU_DEBUG_SWD “-IC:\Arduino\hardware\BSFrance-stm32\stm32\cores\arduino/stm32” “-IC:\Arduino\hardware\BSFrance-stm32\stm32\cores\arduino/usb” “-IC:\Arduino\hardware\BSFrance-stm32\stm32\system/CMSIS” “-IC:\Arduino\hardware\BSFrance-stm32\stm32\system/STM32F1/CMSIS_Inc” “-IC:\Arduino\hardware\BSFrance-stm32\stm32\system/STM32F1/CMSIS_Src” “-IC:\Arduino\hardware\BSFrance-stm32\stm32\system/STM32F1/HAL_Inc” “-IC:\Arduino\hardware\BSFrance-stm32\stm32\system/STM32F1/HAL_Src” “-IC:\Arduino\hardware\BSFrance-stm32\stm32\system/STM32F1/stm32_chip” “-IC:\Arduino\hardware\BSFrance-stm32\stm32\cores\arduino” “-IC:\Arduino\hardware\BSFrance-stm32\stm32\variants\LORAM3_D_F103CB” “C:\Users\nicbk\AppData\Local\Temp\arduino_build_508715\sketch\BSFrance-303-LoRaSpreadRangeTest.ino.cpp” -o “C:\Users\nicbk\AppData\Local\Temp\arduino_build_508715\preproc\ctags_target_for_gcc_minus_e.cpp”
arm-none-eabi-g++: error: CreateProcess: No such file or directory
<
>

I read this: https://github.com/arduino/Arduino/issues/6751

Hi @JTP,

0,13mA is not that bad, you will run over 1.5 years on a 2000mAh cell.

I assume your software is OK, but that either a voltage regulator is consuming current or you have floating input lines. Hard to say without a schematic of your design…

I saw that it’s able to get something around 4uA which is something really useful. I use a 2600mAh cell, but I don’t have the equipment to measure the sending time. I have 3 currents in my Lora end-device ( 1.- Sleep mode: 0.13mA. 2.- Wake-up: 6,05mA. 3.- Data sending: 23mA.). I have a circuit that measures the capacity percentage of the batteries cell in I2C, but I have some troubles in the I2C communication (I’m not sure if it’s a software or hardware problem).

You can see my circuit in the picture bellow:

CMWX1ZZABZ

I appreciate all your help.

Best regards

@JTP This is likely more a STM32L0 question than that it is a Hope RFM95/98 power usage issue. This STM32L0 related article might help. Also the STM32 forum is probably a good source for more information.

Completely powering off the RFM9x could also be an option for minimizing battery usage.
Ah I just see @Charles already suggested this.

@tomtor Thanks for your wonderful post https://www.thethingsnetwork.org/labs/story/a-cheap-stm32-arduino-node

Unfortunately, the code doesn’t compile for my setup ( https://github.com/stm32duino/Arduino_Core_STM32 ) with the bluepill board stm32f103 gives some function not defined error for stdout streams.

On the other hand the “official” library from arduino library manager (1.5+arduino-2 from drop down menu) compiles, but interrupts are creating some problems. This is caused by disableIRQs function where it disables interrupts. if i disable it be commenting it out, i get upto the point of Starting, Packet Queued. I can see the packets in my TTN console…but there is not event notified whether the packet was successful.

So i can not send any more data like sensor values…This also applies to your library.

Kindly help, so that this cheap but capable board can really fly up to its potential…

thanks.

FYI: New thread for STM32: Big STM32 boards topic