2022-01-11 04:32 AM
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 :
Then prepared the SBSFU :
Then prepare the demo project :
Finally I configured and launched the debug configuration with the following details :
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 ?
Solved! Go to Solution.
2022-01-21 11:43 PM
hi @VSpad.1 I was able to solve the issue. It was the issue with policy attached to the thing on the AWS.
2022-01-11 10:29 AM
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
2022-01-12 08:20 AM
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.
2022-01-13 04:31 AM
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 ?
2022-01-20 02:19 PM
Hi @VSpad.1 were you able to connect to aws using B-L475E-IOT01?
2022-01-21 12:08 AM
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 ?
2022-01-21 11:43 PM
hi @VSpad.1 I was able to solve the issue. It was the issue with policy attached to the thing on the AWS.
2022-01-27 06:32 AM
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