cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot debug the AWS demo on B-L475E-IOT01A1

VSpad.1
Associate II

Dear all,

For an IoT project I would like to run the demo of the AWS package provided by ST but for some reason I could not manage to debug the demo project.

To do so I have downloaded the X-CUBE-AWS_v2.0.0 package and used the following ressources :

Before trying to run in debug mode the project I did the following steps :

  1. created a thing on AWS
  2. created a certificate/private key on AWS
  3. provisionned the certificate and private key to aws_clientcredential_keys.h (I don't want to use the ST-SAFE here)
  4. provided connection information into aws_clientcredential.h

Then prepared the SBSFU :

  1. Built the project B-L4S5I-IOT01_2_Images_SECoreBin.
  2. Built the project B-L4S5I-IOT01_2_Images_SBSFU

Then prepare the demo project :

  1. I merge the demo project with the AWSxSTM32 workshop sensor example to get the sensor streaming of the proto board to AWS.
  2. I build the demo project. I had to apply the following fix provided by @Jocelyn RICARD​ 
  3. Using STM32CubeProgrammer, I flashed the .bin file successfully. Note that I did not prepared a .sfb file for testing OTA yet.

Finally I configured and launched the debug configuration with the following details :

  1. Into Load Image and Symbols > uncheck Download
  2. Into Runtime Options > Check Set Program Counter : 0x08000000

Unfortunately, when I finally run the demo app I run into these error logs in the console :

Open On-Chip Debugger 0.11.0-rc2+dev-00037-g4c4dbd9 (2021-02-09-13:36)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : STLINK V2J37M27 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.217860
Info : clock speed 5 kHz
Info : stlink_dap_op_connect(connect)
Info : SWD DPIDR 0x2ba01477
Info : STM32L4S5VITx.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : STM32L4S5VITx.cpu: external reset detected
Info : starting gdb server for STM32L4S5VITx.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x081073cc msp: 0x2009fffc
Info : device idcode = 0x10076415 (STM32L47/L48xx - Rev 4 : 0x1007)
Info : RDP level 0 (0xAA)
Info : flash size = 1024kbytes
Info : flash mode : dual-bank
Warn : negative reply, retrying
Warn : negative reply, retrying
Info : accepting 'gdb' connection on tcp/3333
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x081073cc msp: 0x2009fffc
Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (3889 ms). Workaround: increase "set remotetimeout" in GDB
Warn : negative reply, retrying
Warn : negative reply, retrying
Error: can't add breakpoint: unknown reason
Error: can't add breakpoint: unknown reason

Of course, I have not enabled any breakpoint so I don't know what to do !

Does someone has any suggestion ?

Thank you in advance for your help ! 🙂

EDIT :

I tried to do a fresh start with the ST starting guide for X-CUBE-AWS_v2.2.0

The bootloader compiles well and the demos_osc project as well. However, the demos_osc resulting .elf files weight 4MB but the CPU only has 1MB of FLASH.

What can be the cause of this problem in the example project ?

1 ACCEPTED SOLUTION

Accepted Solutions
Vkamm.1
Associate III

hi @VSpad.1​ I was able to solve the issue. It was the issue with policy attached to the thing on the AWS.

View solution in original post

7 REPLIES 7
Jocelyn RICARD
ST Employee

Hello @VSpad.1​ ,

You are trying to run on a STM32L475 whereas this demo was made for STM32L4S5.

This is confirmed in your trace:

device idcode = 0x10076415 (STM32L47/L48xx - Rev 4 : 0x1007)

This cannot work. You need to get the B-L4S5I-IOT01A

Best regards

Jocelyn

Guillaume K
ST Employee

on STM32L475 it may be easier to run the pre-2.0.0 version of X-CUBE-AWS. You can get the v1.4.1 from st.com ("select version" on X-CUBE-AWS page on st.com).

The V1.y.z versions don't use Amazon FreeRTOS. They use Amazon C IoT SDK which is different from full Amazon FreeRTOS.

If you really want to use Amazon FreeRTOS then versions >=2.0.0 are what you need. But you need a STM32 board that has enough memory to run SBSFU (it uses a lot of Flash memory) and mbedTLS (need RAM). Also the advantage of B-L4S5I-IOT01 (appart from larger memory than B-L475E-IOT01) is that B-L4S5I-IOT01 has an STSAFE chip that is useful for automatic provisioning and connection to AWS Cloud.

VSpad.1
Associate II

Hello @Jocelyn RICARD​ ! Thanks for that ! I was so much looking into the details that I did not pay attention to this unfortunately.

Thanks @Guillaume K​ for your suggestion. At the end I would like to use an STM32L485 to send/receive data to the AWS cloud in an encrypted way and also being able to perform an OTA with the SBSFU. Do you think this is realistic in terms of memory and also would you advice to go for the Amazon C IoT SDK or the full FreeRTOS ?

Vkamm.1
Associate III

Hi @VSpad.1​ were you able to connect to aws using B-L475E-IOT01?

VSpad.1
Associate II

Hello @Vkamm.1​ , unfortunately I realized that I have the wrong board and the B-L475E-IOT01 seems to be out of stock at the moment so I couldn't progress on the problem.

What is your issue exactly ?

Vkamm.1
Associate III

hi @VSpad.1​ I was able to solve the issue. It was the issue with policy attached to the thing on the AWS.

Hello @VSpad.1​ ,

I understood that FreeRTOS should be lighter compared to C SDK.

Also, this is the new framework promoted by AWS.

So, I guess it is worth trying going this way, but cannot tell if 1MB flash will be enough.

Best regards

Jocelyn