Compiling + Uploading for stm32L1 board - Help.

Post here first, or if you can't find a relevant section!
Post Reply
ek613
Posts: 3
Joined: Fri Jan 10, 2020 9:19 pm

Compiling + Uploading for stm32L1 board - Help.

Post by ek613 »

Hello,

I've been stuck on this for a few days, i'm sure the solution is trivial but I need more experienced eyes.
I'm trying to add my own stm32 board into arduino so i can work with it.

What i've done:
Ive installed the stm32duino arduino core, and ive tested i can build a script for a board that comes with it, i tested the LoRa board RAK811 which uses an STM32L1. This MCU is the same series as mine (L1).

I made my own board variant following the: stm32duino new variant wiki

Files are in the correct folder location for my windows 10 operating system, and I must have all necessary tools installed because I compiled for one of the boards that comes with the arduino core repo via board manager install, but i get the following error when I compile for my custom board:

Code: Select all

arm-none-eabi-g++: error: match: No such file or directory
arm-none-eabi-g++: error: to: No such file or directory
arm-none-eabi-g++: error: a: No such file or directory
arm-none-eabi-g++: error: define: No such file or directory
arm-none-eabi-g++: error: in: No such file or directory
arm-none-eabi-g++: error: /stm32l1xx.h: No such file or directory
arm-none-eabi-g++: error: system/Drivers/CMSIS/Device/ST/STM32L1xx/Include/stm32l1xx.h: No such file or directory
exit status 1
Error compiling for board PILL_L1.
Ive attached a zip file of my board variant, and my boards.txt file
PILL_L1.zip
STM32L1 custom board variant
(20.09 KiB) Downloaded 262 times
How should I start to troubleshoot this? I really appreciate the help!
Thanks,
-E
Last edited by ek613 on Thu Jan 23, 2020 2:39 am, edited 1 time in total.
.rpv
Posts: 43
Joined: Wed Dec 18, 2019 10:19 pm

Re: Compiling for stm32L1 board - Help.

Post by .rpv »

Hi, so with this boards.txt segment:

Code: Select all

################################################################################
# Generic L1

GenL1.name=PILL_L1

GenL1.build.core=arduino
GenL1.build.board=GenL1
GenL1.build.extra_flags=-D{build.product_line} {build.enable_usb} {build.xSerial}

# PILL_L1 Board
# Supports: Serial1 (USART1 on PA10, PA9), and Serial2 (USART2)
GenL1.menu.pnum.PILL_L1=PILL_L1 (64kb Flash)
GenL1.menu.pnum.PILL_L1.upload.maximum_size=65536
GenL1.menu.pnum.PILL_L1.upload.maximum_data_size=20480
GenL1.menu.pnum.PILL_L1.build.mcu=cortex-m3
GenL1.menu.pnum.PILL_L1.build.board=PILL_L1
GenL1.menu.pnum.PILL_L1.build.series=STM32L1xx
GenL1.menu.pnum.PILL_L1.build.product_line=STM32L151xCA
GenL1.menu.pnum.PILL_L1.build.variant=PILL_L1
GenL1.menu.pnum.PILL_L1.build.cmsis_lib_gcc=arm_cortexM3l_math

# Upload menu
GenL1.menu.upload_method.swdMethod=STM32CubeProgrammer (SWD)
GenL1.menu.upload_method.swdMethod.upload.protocol=0
GenL1.menu.upload_method.swdMethod.upload.options=-g
GenL1.menu.upload_method.swdMethod.upload.tool=stm32CubeProg

GenL1.menu.upload_method.serialMethod=STM32CubeProgrammer (Serial)
GenL1.menu.upload_method.serialMethod.upload.protocol=1
GenL1.menu.upload_method.serialMethod.upload.options={serial.port.file} -s
GenL1.menu.upload_method.serialMethod.upload.tool=stm32CubeProg

GenL1.menu.xserial.generic=Enabled with generic Serial
GenL1.menu.xserial.none=Enabled without generic Serial
GenL1.menu.xserial.none.build.xSerial=-DHAL_UART_MODULE_ENABLED -DHWSERIAL_NONE
GenL1.menu.xserial.disabled=Disabled (No Serial)
GenL1.menu.xserial.disabled.build.xSerial=

GenL1.menu.upload_method.dfuMethod=STM32CubeProgrammer (DFU)
GenL1.menu.upload_method.dfuMethod.upload.protocol=2
GenL1.menu.upload_method.dfuMethod.upload.options=-g
GenL1.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg

GenL1.menu.upload_method.bmpMethod=BMP (Black Magic Probe)
GenL1.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp
GenL1.menu.upload_method.bmpMethod.upload.tool=bmp_upload

GenL1.menu.upload_method.STLink=STLink
GenL1.menu.upload_method.STLink.upload.protocol=STLink
GenL1.menu.upload_method.STLink.upload.tool=stlink_upload

GenL1.menu.usb.none=None

################################################################################
You don't get the previous error but you'll get new ones, first at running the blinky scketch you'll get and "LED_BUILTIN" undefined error, you board has a blinking led build in?, if so it's not specified on your variant, also, the pinout seems to have errors too, do you have an schematic?.
User avatar
fpiSTM
Posts: 1745
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Compiling for stm32L1 board - Help.

Post by fpiSTM »

Hi ek613
Like .rpv answered it's linked to your addition in boards.txt,

If you read your log error you should note this is your comment at the line ending:
GenL1.menu.pnum.PILL_L1.build.product_line=STM32L151xCA #must match to a define in "/stm32l1xx.h" system/Drivers/CMSIS/Device/ST/STM32L1xx/Include/stm32l1xx.h
ek613
Posts: 3
Joined: Fri Jan 10, 2020 9:19 pm

Re: Compiling for stm32L1 board - Help.

Post by ek613 »

Alot closer! Thank you so much .rpv & fpiSTM, can't believe I let a comment fool me :shock:

The blink sketch is now compiling, but I'm receiving these errors when flashing the STM32L1 via FTDI to USART serial1 (PA10(rx) & PA9(tx)) with both the arduino ide, and STM32 Cube programmer:

Code: Select all

      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.2.1                  
      -------------------------------------------------------------------

Serial Port COM10 is successfully opened.
Port configuration: parity = even, baudrate = 115200, data-bit = 8,
                     stop-bit = 1.0, flow-control = off
Activating device: OK
Chip ID: 0x429 
BootLoader protocol version: 3.1
Device name : STM32L100x6xxA/STM32L100x8xxA/STM32L100xBxxA/STM32L15xx6xxA/STM32L15xx8xxA/STM32L15xxBxxA

Response received from device: NACK


Error: Number of bytes to be be read at address: 0x1FF8004C not acknowledged!
Flash size  : 128 KBytes (default)
Device type : MCU
Device CPU  : Cortex-M3

Error: RDP level is set to 1 (0xBB), try using Read UnProtect (-rdu) command in order to remove the Read Out Protection.


RUNNING Program ... 
  Address:      : 0x8000000

Response received from device: NACK
Error: Problem encountred during the start operation
Error: Start operation failed
This MCU is fresh from the factory. Also it is 64KB Flash size, not 128KB as shown in the logs above...?

This is the Verbose output when just trying to connect to the device with STM cube programmer:

Code: Select all

19:03:02:388 : Serial Port COM10 is successfully opened.
19:03:02:389 : Port configuration: parity = even, baudrate = 9600, data-bit = 8, stop-bit = 1.0, flow-control = off
19:03:02:389 : No Init bits value is : 0
19:03:02:390 : Sending init command:
19:03:02:394 : byte 0x7F sent successfully to target
19:03:02:474 : Wait ends after 1 loop, dataready = 1, delay = 6
19:03:02:475 : Received response from target: 0x79
19:03:02:475 : Activating device: OK
19:03:02:475 : Sending GetID command and its XOR:
19:03:02:475 : byte 0x02 sent successfully to target
19:03:02:476 : byte 0xFD sent successfully to target
19:03:02:476 : Wait ends after 1 loop, dataready = 1, delay = 4
19:03:02:476 : Received response from target: 0x79
19:03:02:476 : Received response from target: 0x01042979
19:03:02:476 : Chip ID: 0x429
19:03:02:477 : Sending Get command and its XOR:
19:03:02:477 : byte 0x00 sent successfully to target
19:03:02:477 : byte 0xFF sent successfully to target
19:03:02:477 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:02:477 : Received response from target: 0x79
19:03:02:478 : Received response from target: 0x0b
19:03:02:478 : size of bytes in the response: 11
19:03:02:478 : Received response from target: 0x31000102112131446373829279
19:03:02:478 : Full received response: 0b31000102112131446373829279
19:03:02:478 : BootLoader protocol version: 3.1
19:03:02:478 : byte 0x11 sent successfully to target
19:03:02:479 : byte 0xEE sent successfully to target
19:03:02:481 : data sent successfully to target: 0x0800000008
19:03:02:505 : byte 0x00 sent successfully to target
19:03:02:506 : byte 0xFF sent successfully to target
19:03:02:511 : Sending GetID command and its XOR:
19:03:02:511 : byte 0x02 sent successfully to target
19:03:02:512 : byte 0xFD sent successfully to target
19:03:02:523 : Wait ends after 1 loop, dataready = 1, delay = 16
19:03:02:524 : Received response from target: 0x79
19:03:02:525 : Received response from target: 0x01042979
19:03:02:615 : byte 0x11 sent successfully to target
19:03:02:616 : byte 0xEE sent successfully to target
19:03:02:640 : data sent successfully to target: 0x0800000008
19:03:02:655 : byte 0x00 sent successfully to target
19:03:02:656 : byte 0xFF sent successfully to target
19:03:02:673 : Sending Read command and its XOR:
19:03:02:673 : byte 0x11 sent successfully to target
19:03:02:673 : byte 0xEE sent successfully to target
19:03:02:689 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:02:689 : Received response from target: 0x79
19:03:02:689 : Sending Read address and its checksum:
19:03:02:690 : data sent successfully to target: 0x1ff80000e7
19:03:02:741 : Wait ends after 1 loop, dataready = 1, delay = 16
19:03:02:742 : Received response from target: 0x79
19:03:02:742 : Sending number of bytes to be read - 1 and its checksum:
19:03:02:742 : data sent successfully to target: 0x03fc
19:03:02:742 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:02:743 : Received response from target: 0x79
19:03:02:743 : Received response from target: 0xaa0055ff
19:03:02:743 : Database: Config 0 is active.
19:03:02:743 : byte 0x11 sent successfully to target
19:03:02:743 : byte 0xEE sent successfully to target
19:03:02:744 : data sent successfully to target: 0x0800000008
19:03:02:769 : byte 0x00 sent successfully to target
19:03:02:770 : byte 0xFF sent successfully to target
19:03:02:770 : Sending Read command and its XOR:
19:03:02:770 : byte 0x11 sent successfully to target
19:03:02:770 : byte 0xEE sent successfully to target
19:03:02:783 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:02:783 : Received response from target: 0x79
19:03:02:784 : Sending Read address and its checksum:
19:03:02:784 : data sent successfully to target: 0x1ff8004cab
19:03:02:796 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:02:797 : Received response from target: 0x79
19:03:02:797 : Sending number of bytes to be read - 1 and its checksum:
19:03:02:797 : data sent successfully to target: 0x03fc
19:03:02:797 : Received response from target: 0x1f
19:03:02:797 : Response received from device: NACK
19:03:02:798 : Error: Number of bytes to be be read at address: 0x1FF8004C not acknowledged!
19:03:02:798 : failed to read the requested memory content
19:03:02:798 : Could not read flash size at address 0x1ff8004c
19:03:06:877 : Sending Read command and its XOR:
19:03:06:877 : byte 0x11 sent successfully to target
19:03:06:877 : bytesToWrite before send = 1
19:03:06:877 : bFlushRet = 1, bytesToWrite after flush() = 1
19:03:06:937 : waitForBytesWritten Error : The wait operation timed out.
19:03:06:938 : byte 0xEE sent successfully to target
19:03:06:938 : Wait ends after 1 loop, dataready = 1, delay = 7
19:03:06:938 : Received response from target: 0x79
19:03:06:938 : Sending Read address and its checksum:
19:03:06:938 : data sent successfully to target: 0x1ff8004cab
19:03:06:938 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:06:938 : Received response from target: 0x79
19:03:06:938 : Sending number of bytes to be read - 1 and its checksum:
19:03:06:939 : data sent successfully to target: 0x03fc
19:03:06:939 : Received response from target: 0x1f
19:03:06:939 : Response received from device: NACK
19:03:06:939 : Error: Number of bytes to be be read at address: 0x1FF8004C not acknowledged!
19:03:06:939 : failed to read the requested memory content
19:03:06:940 : Could not read flash size at address 0x1ff8004c
19:03:06:940 : Sending Read command and its XOR:
19:03:06:940 : byte 0x11 sent successfully to target
19:03:06:940 : bytesToWrite before send = 1
19:03:06:940 : bFlushRet = 1, bytesToWrite after flush() = 1
19:03:06:940 : waitForBytesWritten Error : The wait operation timed out.
19:03:06:940 : byte 0xEE sent successfully to target
19:03:06:941 : Wait ends after 1 loop, dataready = 1, delay = 9
19:03:06:941 : Received response from target: 0x79
19:03:06:941 : Sending Read address and its checksum:
19:03:06:941 : data sent successfully to target: 0x1ff8004cab
19:03:06:941 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:06:941 : Received response from target: 0x79
19:03:06:942 : Sending number of bytes to be read - 1 and its checksum:
19:03:06:942 : data sent successfully to target: 0x03fc
19:03:06:942 : Received response from target: 0x1f
19:03:06:942 : Response received from device: NACK
19:03:06:942 : Error: Number of bytes to be be read at address: 0x1FF8004C not acknowledged!
19:03:06:942 : failed to read the requested memory content
19:03:06:942 : Could not read flash size at address 0x1ff8004c
19:03:06:942 : Sending GetID command and its XOR:
19:03:06:942 : byte 0x02 sent successfully to target
19:03:06:943 : byte 0xFD sent successfully to target
19:03:06:943 : Wait ends after 1 loop, dataready = 1, delay = 14
19:03:06:943 : Received response from target: 0x1f
19:03:06:943 : Response received from device: NACK
19:03:06:943 : Error: GETID command not acknowledged!
19:03:06:943 : Reemission of GetID command
19:03:06:943 : Sending GetID command and its XOR:
19:03:06:943 : byte 0x02 sent successfully to target
19:03:06:944 : byte 0xFD sent successfully to target
19:03:06:944 : Received response from target: 0x79
19:03:06:944 : Received response from target: 0x01042979
19:03:06:944 : byte 0x11 sent successfully to target
19:03:06:944 : bytesToWrite before send = 1
19:03:06:945 : bFlushRet = 1, bytesToWrite after flush() = 1
19:03:06:945 : waitForBytesWritten Error : The wait operation timed out.
19:03:06:945 : byte 0xEE sent successfully to target
19:03:06:945 : data sent successfully to target: 0x0800000008
19:03:06:945 : byte 0x00 sent successfully to target
19:03:06:946 : byte 0xFF sent successfully to target
19:03:06:946 : UPLOADING OPTION BYTES DATA ...
19:03:06:946 : Bank : 0x00
19:03:06:946 : Address : 0x1ff80000
19:03:06:947 : Size : 24 Bytes
19:03:06:947 : Sending Read command and its XOR:
19:03:06:948 : byte 0x11 sent successfully to target
19:03:06:948 : byte 0xEE sent successfully to target
19:03:06:948 : Wait ends after 1 loop, dataready = 1, delay = 13
19:03:06:948 : Received response from target: 0x79
19:03:06:948 : Sending Read address and its checksum:
19:03:06:948 : data sent successfully to target: 0x1ff80000e7
19:03:06:948 : Wait ends after 1 loop, dataready = 1, delay = 16
19:03:06:949 : Received response from target: 0x79
19:03:06:949 : Sending number of bytes to be read - 1 and its checksum:
19:03:06:949 : data sent successfully to target: 0x17e8
19:03:06:949 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:06:949 : Received response from target: 0x79
19:03:06:949 : Received response from target: 0xaa0055fff80007ff0000ffff0000ffff0000ffff0000ffff
19:03:06:950 : UPLOADING OPTION BYTES DATA ...
19:03:06:950 : Bank : 0x00
19:03:06:950 : Address : 0x1ff80000
19:03:06:950 : Size : 24 Bytes
19:03:06:950 : Sending Read command and its XOR:
19:03:06:950 : byte 0x11 sent successfully to target
19:03:06:950 : byte 0xEE sent successfully to target
19:03:06:951 : Wait ends after 1 loop, dataready = 1, delay = 14
19:03:06:951 : Received response from target: 0x79
19:03:06:951 : Sending Read address and its checksum:
19:03:06:951 : data sent successfully to target: 0x1ff80000e7
19:03:06:951 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:06:952 : Received response from target: 0x79
19:03:06:952 : Sending number of bytes to be read - 1 and its checksum:
19:03:06:952 : data sent successfully to target: 0x17e8
19:03:06:952 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:06:952 : Received response from target: 0x79
19:03:06:952 : Received response from target: 0xaa0055fff80007ff0000ffff0000ffff0000ffff0000ffff
19:03:06:953 : Sending Read command and its XOR:
19:03:06:953 : byte 0x11 sent successfully to target
19:03:06:953 : bytesToWrite before send = 1
19:03:06:953 : bFlushRet = 1, bytesToWrite after flush() = 1
19:03:07:596 : waitForBytesWritten Error : The wait operation timed out.
19:03:07:727 : byte 0xEE sent successfully to target
19:03:07:740 : Wait ends after 1 loop, dataready = 1, delay = 11
19:03:07:741 : Received response from target: 0x79
19:03:07:741 : Sending Read address and its checksum:
19:03:07:742 : data sent successfully to target: 0x1ff8004cab
19:03:07:752 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:07:752 : Received response from target: 0x79
19:03:07:753 : Sending number of bytes to be read - 1 and its checksum:
19:03:07:754 : data sent successfully to target: 0x03fc
19:03:07:754 : Received response from target: 0x1f
19:03:07:755 : Response received from device: NACK
19:03:07:755 : Error: Number of bytes to be be read at address: 0x1FF8004C not acknowledged!
19:03:07:756 : failed to read the requested memory content
19:03:07:756 : Could not read flash size at address 0x1ff8004c
19:03:07:756 : Sending GetID command and its XOR:
19:03:07:758 : byte 0x02 sent successfully to target
19:03:07:761 : byte 0xFD sent successfully to target
19:03:07:769 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:07:769 : Received response from target: 0x1f
19:03:07:769 : Response received from device: NACK
19:03:07:769 : Error: GETID command not acknowledged!
19:03:07:769 : Reemission of GetID command
19:03:07:770 : Sending GetID command and its XOR:
19:03:07:770 : byte 0x02 sent successfully to target
19:03:07:770 : byte 0xFD sent successfully to target
19:03:07:770 : Received response from target: 0x79
19:03:07:770 : Received response from target: 0x01042979
19:03:07:773 : UPLOADING ...
19:03:07:774 : Size : 1024 Bytes
19:03:07:774 : Address : 0x8000000
19:03:07:774 : Read progress:
19:03:07:774 : Sending Read command and its XOR:
19:03:07:776 : byte 0x11 sent successfully to target
19:03:07:776 : bytesToWrite before send = 1
19:03:07:776 : bFlushRet = 1, bytesToWrite after flush() = 1
19:03:08:771 : waitForBytesWritten Error : The wait operation timed out.
19:03:08:896 : byte 0xEE sent successfully to target
19:03:08:904 : Wait ends after 1 loop, dataready = 1, delay = 8
19:03:08:904 : Received response from target: 0x79
19:03:08:905 : Sending Read address and its checksum:
19:03:08:905 : data sent successfully to target: 0x0800000008
19:03:08:920 : Wait ends after 1 loop, dataready = 1, delay = 16
19:03:08:920 : Received response from target: 0x79
19:03:08:921 : Sending number of bytes to be read - 1 and its checksum:
19:03:08:922 : data sent successfully to target: 0xff00
19:03:08:936 : Wait ends after 1 loop, dataready = 1, delay = 16
19:03:08:936 : Received response from target: 0x79
19:03:09:256 : Received response from target: 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
19:03:09:257 : Sending Read command and its XOR:
19:03:09:258 : byte 0x11 sent successfully to target
19:03:09:266 : byte 0xEE sent successfully to target
19:03:09:275 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:09:276 : Received response from target: 0x79
19:03:09:277 : Sending Read address and its checksum:
19:03:09:283 : data sent successfully to target: 0x0800010009
19:03:09:290 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:09:291 : Received response from target: 0x79
19:03:09:291 : Sending number of bytes to be read - 1 and its checksum:
19:03:09:291 : data sent successfully to target: 0xff00
19:03:09:304 : Wait ends after 1 loop, dataready = 1, delay = 16
19:03:09:304 : Received response from target: 0x79
19:03:09:624 : Received response from target: 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
19:03:09:626 : Sending Read command and its XOR:
19:03:09:628 : byte 0x11 sent successfully to target
19:03:09:629 : byte 0xEE sent successfully to target
19:03:09:643 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:09:644 : Received response from target: 0x79
19:03:09:644 : Sending Read address and its checksum:
19:03:09:645 : data sent successfully to target: 0x080002000a
19:03:09:664 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:09:665 : Received response from target: 0x79
19:03:09:665 : Sending number of bytes to be read - 1 and its checksum:
19:03:09:666 : data sent successfully to target: 0xff00
19:03:09:680 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:09:680 : Received response from target: 0x79
19:03:09:992 : Received response from target: 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
19:03:09:993 : Sending Read command and its XOR:
19:03:09:996 : byte 0x11 sent successfully to target
19:03:09:997 : byte 0xEE sent successfully to target
19:03:10:013 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:10:014 : Received response from target: 0x79
19:03:10:014 : Sending Read address and its checksum:
19:03:10:015 : data sent successfully to target: 0x080003000b
19:03:10:028 : Wait ends after 1 loop, dataready = 1, delay = 14
19:03:10:037 : Received response from target: 0x79
19:03:10:038 : Sending number of bytes to be read - 1 and its checksum:
19:03:10:038 : data sent successfully to target: 0xff00
19:03:10:043 : Wait ends after 1 loop, dataready = 1, delay = 14
19:03:10:044 : Received response from target: 0x79
19:03:10:360 : Received response from target: 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
19:03:10:361 : Data read successfully
19:03:10:361 : Time elapsed during the read operation is: 00:00:02.590
19:03:10:429 : Sending Read command and its XOR:
19:03:10:429 : byte 0x11 sent successfully to target
19:03:10:429 : bytesToWrite before send = 1
19:03:10:430 : bFlushRet = 1, bytesToWrite after flush() = 1
19:03:11:365 : waitForBytesWritten Error : The wait operation timed out.
19:03:11:503 : byte 0xEE sent successfully to target
19:03:11:531 : Wait ends after 1 loop, dataready = 1, delay = 8
19:03:11:531 : Received response from target: 0x79
19:03:11:531 : Sending Read address and its checksum:
19:03:11:531 : data sent successfully to target: 0x1ff8004cab
19:03:11:536 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:11:536 : Received response from target: 0x79
19:03:11:536 : Sending number of bytes to be read - 1 and its checksum:
19:03:11:536 : data sent successfully to target: 0x03fc
19:03:11:538 : Received response from target: 0x1f
19:03:11:538 : Response received from device: NACK
19:03:11:538 : Error: Number of bytes to be be read at address: 0x1FF8004C not acknowledged!
19:03:11:538 : failed to read the requested memory content
19:03:11:538 : Could not read flash size at address 0x1ff8004c
19:03:11:538 : Sending GetID command and its XOR:
19:03:11:539 : byte 0x02 sent successfully to target
19:03:11:539 : byte 0xFD sent successfully to target
19:03:11:673 : Wait ends after 1 loop, dataready = 1, delay = 14
19:03:11:673 : Received response from target: 0x1f
19:03:11:674 : Response received from device: NACK
19:03:11:674 : Error: GETID command not acknowledged!
19:03:11:674 : Reemission of GetID command
19:03:11:674 : Sending GetID command and its XOR:
19:03:11:674 : byte 0x02 sent successfully to target
19:03:11:674 : byte 0xFD sent successfully to target
19:03:11:674 : Received response from target: 0x79
19:03:11:675 : Received response from target: 0x01042979
19:03:12:543 : Sending Read command and its XOR:
19:03:12:568 : byte 0x11 sent successfully to target
19:03:12:568 : byte 0xEE sent successfully to target
19:03:12:569 : Received response from target: 0x79
19:03:12:569 : Sending Read address and its checksum:
19:03:12:569 : data sent successfully to target: 0x1ff8004cab
19:03:12:569 : Received response from target: 0x01
19:03:12:570 : Error: Address not acknowledged: 0x1FF8004C
19:03:12:570 : failed to read the requested memory content
19:03:12:570 : Could not read flash size at address 0x1ff8004c
19:03:12:571 : Sending GetID command and its XOR:
19:03:12:571 : byte 0x02 sent successfully to target
19:03:12:571 : byte 0xFD sent successfully to target
19:03:12:572 : Received response from target: 0x04
19:03:12:572 : Error: GETID command not acknowledged!
19:03:12:572 : Reemission of GetID command
19:03:12:573 : Sending GetID command and its XOR:
19:03:12:573 : byte 0x02 sent successfully to target
19:03:12:573 : byte 0xFD sent successfully to target
19:03:12:573 : Received response from target: 0x29
19:03:12:574 : Error: GETID command not acknowledged!
19:03:12:574 : Reemission of GetID command
19:03:12:574 : Sending GetID command and its XOR:
19:03:12:575 : byte 0x02 sent successfully to target
19:03:12:575 : byte 0xFD sent successfully to target
19:03:12:575 : Received response from target: 0x79
19:03:12:578 : Received response from target: 0x79791f1f
19:03:12:579 : Sending GetID command and its XOR:
19:03:12:579 : byte 0x02 sent successfully to target
19:03:12:579 : byte 0xFD sent successfully to target
19:03:12:579 : Received response from target: 0x1f
19:03:12:580 : Response received from device: NACK
19:03:12:580 : Error: GETID command not acknowledged!
19:03:12:580 : Reemission of GetID command
19:03:12:580 : Sending GetID command and its XOR:
19:03:12:580 : byte 0x02 sent successfully to target
19:03:12:581 : byte 0xFD sent successfully to target
19:03:12:887 : Wait ends after 1 loop, dataready = 1, delay = 14
19:03:12:887 : Received response from target: 0x1f
19:03:12:887 : Response received from device: NACK
19:03:12:887 : Error: GETID command not acknowledged!
19:03:12:887 : Reemission of GetID command
19:03:12:887 : Sending GetID command and its XOR:
19:03:12:887 : byte 0x02 sent successfully to target
19:03:12:888 : byte 0xFD sent successfully to target
19:03:12:888 : Received response from target: 0x1f
19:03:12:888 : Response received from device: NACK
19:03:12:888 : Error: GETID command not acknowledged!
19:03:12:888 : Warning: Connection to device 0x429 is lost
19:03:13:363 : Disconnected from device.
ek613
Posts: 3
Joined: Fri Jan 10, 2020 9:19 pm

Re: Compiling + Uploading for stm32L1 board - Help.

Post by ek613 »

Not 100% why im experiencing these issues, likely because of incorrect bootloader. Workaround is to use this tool (https://my.st.com/content/my_st_com/en/ ... l#overview) for flashing arduino .hex code via UART.
User avatar
fpiSTM
Posts: 1745
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Compiling + Uploading for stm32L1 board - Help.

Post by fpiSTM »

You could try to update to the cube programmer 2.3
Post Reply

Return to “General discussion”