New Board STM32L432KC

Hi Ivan
I am getting an error when I try to upload the nucleo board STM32L432KC(256Kb flash). The same code works with STM32F303K8 (64Kb flash).

I am getting an unknown chip error - WARN src/stlink-common.c: unknown chip id! 0x10016435*** [upload] Error 255

The output build error is attached below:

[Fri Sep 16 20:16:24 2016] Processing nucleo_l432kc (upload_protocol: stlink, platform: ststm32, lib_deps: MODGPS, Eigen, board: nucleo_l432kc, framework: mbed)------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via -v, --verbose optionCollected 13 compatible librariesLooking for dependencies…Library Dependency Graph|-- v3.13.1|-- |-- Linking .pioenvs/nucleo_l432kc/firmware.elfChecking program size .pioenvs/nucleo_l432kc/firmware.elftext data bss dec hex filename57964 2252 1024 61240 ef38 .pioenvs/nucleo_l432kc/firmware.elfUploading .pioenvs/nucleo_l432kc/firmware.bin2016-09-16T20:16:26 INFO src/stlink-common.c: Loading device parameters…2016-09-16T20:16:26 WARN src/stlink-common.c: unknown chip id! 0x10016435*** [upload] Error 255========================================================================================================== [ERROR] Took 1.98 seconds ==========================================================================================================

This is the new board I commited to the devel branch. Also, let me know if I need to make more changes.

Best

Chandra

Does this board have mbed bootloader with media disk?

Hi Ivan
Yes it has mbed support - NUCLEO-L432KC | Mbed

The code builds and I am able to get the bin and elf files.

My guess is there is some problem with the ST-Link (flashing for Linux) - STLINK/V2-1 and STLINK/V2 SN incompatibility on NUCLEO-F401RE board · Issue #417 · stlink-org/stlink · GitHub

Do you know of any alternative way of flashing the bin/elf file till the bug is fixed ?

Best

Chandra

  1. If this board has mbed disk, then please remove upload_protocol = stlink from platformio.ini
  2. This is a new board. Need to check if GitHub - stlink-org/stlink: Open source STM32 MCU programming toolset supports it.

Hi Ivan
PFA some observations:

The upload_protocol =stlink worked with STM32F303K8 (similar family board). The results below are for STM32L432KC

  1. upload_protocol = stlink

  2. #upload_protocol= stlink //(commented)

  3. upload_port = /media/chandra/NODE_L432KC

  4. Output from upload in 3

  5. Serial monitor port display

Hope it helps.

Best

Chandra

Does this disk contain any files/folders?

Hi Ivan
The NODE_L432KC contains two files mbed.html and one more file.

If I build code using platformio and copy/paste the xxx_yyy.bin file to NODE_L432KC, it works.

If I add upload_device = /media/ “user” / NODE_L432KC in platformio.ini in Linux, it works. However, repeated flashing overflows the memory rather than overwriting the file.

In Windows, it works fine.

You can close this thread.

Best

Chandra

Could you try the latest development version? Redirecting...

I’ve just improved it

Hi Ivan
Thanks for the update. If it works as you say it must, this issue #669 should be closed.

I will try it out tonight and let you know by tomorrow.

Best

Chandra