Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


problem with debugging the GPIO existing code on the stm32L4RG board

Hi
I am trying to run the existing project of GPIO IOtoggle on board stm32L4RG using stmworkbench Ac6 on linux. while debugging and running the code, I am facing the problem mentioned below:

Info : STLINK v2 JTAG v28 API v2 M v17 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 3.252277
Info : STM32L476RGTx.cpu: hardware has 6 breakpoints, 4 watchpoints
adapter speed: 480 kHz
STM32L476RGTx.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0800294c msp: 0x20000520
adapter speed: 4000 kHz

    • Programming Started **

auto erase enabled
Info : Device id = 0x10076415
Info : STM32L4xx flash size is 1024kb, base address is 0x8000000
Warn : no flash bank found for address 0
wrote 0 bytes from file /home/controller/Ac6/SystemWorkbench/STM32Cube_FW_L4_V1.8.0/STM32Cube_FW_L4_V1.8.1/Projects/STM32L476RG-Nucleo/Examples/GPIO/GPIO_EXTI/Src/main.c in 0.001795s (0.000 KiB/s)

    • Programming Finished **
    • Verify Started **

STM32L476RGTx.cpu: target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000002e msp: 0x20000520
Error: checksum mismatch - attempting binary compare
diff 0 address 0x00000000. Was 0x20 instead of 0x2f
diff 1 address 0x00000001. Was 0x05 instead of 0x2a
diff 2 address 0x00000002. Was 0x00 instead of 0x2a
diff 3 address 0x00000003. Was 0x20 instead of 0x0d
diff 4 address 0x00000004. Was 0x4d instead of 0x0a
diff 5 address 0x00000005. Was 0x29 instead of 0x20
diff 6 address 0x00000006. Was 0x00 instead of 0x20
diff 7 address 0x00000007. Was 0x08 instead of 0x2a
diff 8 address 0x00000008. Was 0xe9 instead of 0x2a
diff 9 address 0x00000009. Was 0x26 instead of 0x2a
diff 10 address 0x0000000a. Was 0x00 instead of 0x2a
diff 11 address 0x0000000b. Was 0x08 instead of 0x2a
diff 12 address 0x0000000c. Was 0xeb instead of 0x2a
diff 13 address 0x0000000d. Was 0x26 instead of 0x2a
diff 14 address 0x0000000e. Was 0x00 instead of 0x2a
diff 15 address 0x0000000f. Was 0x08 instead of 0x2a
diff 16 address 0x00000010. Was 0xed instead of 0x2a
diff 17 address 0x00000011. Was 0x26 instead of 0x2a
diff 18 address 0x00000012. Was 0x00 instead of 0x2a
diff 19 address 0x00000013. Was 0x08 instead of 0x2a
diff 20 address 0x00000014. Was 0xef instead of 0x2a
diff 21 address 0x00000015. Was 0x26 instead of 0x2a
diff 22 address 0x00000016. Was 0x00 instead of 0x2a
diff 23 address 0x00000017. Was 0x08 instead of 0x2a
diff 24 address 0x00000018. Was 0xf1 instead of 0x2a
diff 25 address 0x00000019. Was 0x26 instead of 0x2a
diff 26 address 0x0000001a. Was 0x00 instead of 0x2a
diff 27 address 0x0000001b. Was 0x08 instead of 0x2a
diff 28 address 0x0000001c. Was 0x00 instead of 0x2a
diff 29 address 0x0000001d. Was 0x00 instead of 0x2a
diff 30 address 0x0000001e. Was 0x00 instead of 0x2a
diff 31 address 0x0000001f. Was 0x00 instead of 0x2a
diff 32 address 0x00000020. Was 0x00 instead of 0x2a
diff 33 address 0x00000021. Was 0x00 instead of 0x2a
diff 34 address 0x00000022. Was 0x00 instead of 0x2a
diff 35 address 0x00000023. Was 0x00 instead of 0x2a
diff 36 address 0x00000024. Was 0x00 instead of 0x2a
diff 37 address 0x00000025. Was 0x00 instead of 0x2a
diff 38 address 0x00000026. Was 0x00 instead of 0x2a
diff 39 address 0x00000027. Was 0x00 instead of 0x2a
diff 40 address 0x00000028. Was 0x00 instead of 0x2a
diff 41 address 0x00000029. Was 0x00 instead of 0x2a
diff 42 address 0x0000002a. Was 0x00 instead of 0x2a
diff 43 address 0x0000002b. Was 0x00 instead of 0x2a
diff 44 address 0x0000002c. Was 0xf3 instead of 0x2a
diff 45 address 0x0000002d. Was 0x26 instead of 0x2a
diff 46 address 0x0000002e. Was 0x00 instead of 0x2a
diff 47 address 0x0000002f. Was 0x08 instead of 0x2a
diff 48 address 0x00000030. Was 0xf5 instead of 0x2a
diff 49 address 0x00000031. Was 0x26 instead of 0x2a
diff 50 address 0x00000032. Was 0x00 instead of 0x2a
diff 51 address 0x00000033. Was 0x08 instead of 0x2a
diff 52 address 0x00000034. Was 0x00 instead of 0x2a
diff 53 address 0x00000035. Was 0x00 instead of 0x2a
diff 54 address 0x00000036. Was 0x00 instead of 0x2a
diff 55 address 0x00000037. Was 0x00 instead of 0x2a
diff 56 address 0x00000038. Was 0xf7 instead of 0x2a
diff 57 address 0x00000039. Was 0x26 instead of 0x2a
diff 58 address 0x0000003a. Was 0x00 instead of 0x2a
diff 59 address 0x0000003b. Was 0x08 instead of 0x2a
diff 60 address 0x0000003c. Was 0xf9 instead of 0x2a
diff 61 address 0x0000003d. Was 0x26 instead of 0x2a
diff 62 address 0x0000003e. Was 0x00 instead of 0x2a
diff 63 address 0x0000003f. Was 0x08 instead of 0x2a
diff 64 address 0x00000040. Was 0xb1 instead of 0x2a
diff 65 address 0x00000041. Was 0x29 instead of 0x2a
diff 66 address 0x00000042. Was 0x00 instead of 0x2a
diff 67 address 0x00000043. Was 0x08 instead of 0x2a
diff 68 address 0x00000044. Was 0xb5 instead of 0x2a
diff 69 address 0x00000045. Was 0x29 instead of 0x2a
diff 70 address 0x00000046. Was 0x00 instead of 0x2a
diff 71 address 0x00000047. Was 0x08 instead of 0x2a
diff 72 address 0x00000048. Was 0xb9 instead of 0x2a
diff 73 address 0x00000049. Was 0x29 instead of 0x2a
diff 74 address 0x0000004a. Was 0x00 instead of 0x2a
diff 75 address 0x0000004b. Was 0x08 instead of 0x2a
diff 76 address 0x0000004c. Was 0xbd instead of 0x2a
diff 77 address 0x0000004d. Was 0x29 instead of 0x2a
diff 78 address 0x0000004e. Was 0x00 instead of 0x2a
diff 79 address 0x0000004f. Was 0x08 instead of 0x2a
diff 80 address 0x00000050. Was 0xc1 instead of 0x2a
diff 81 address 0x00000051. Was 0x29 instead of 0x2a
diff 82 address 0x00000052. Was 0x00 instead of 0x2a
diff 83 address 0x00000053. Was 0x08 instead of 0x2a
diff 84 address 0x00000054. Was 0xc5 instead of 0x2a
diff 85 address 0x00000055. Was 0x29 instead of 0x0d
diff 86 address 0x00000056. Was 0x00 instead of 0x0a
diff 87 address 0x00000057. Was 0x08 instead of 0x20
diff 88 address 0x00000058. Was 0xc9 instead of 0x20
diff 89 address 0x00000059. Was 0x29 instead of 0x2a
diff 90 address 0x0000005a. Was 0x00 instead of 0x20
diff 91 address 0x0000005b. Was 0x08 instead of 0x40
diff 92 address 0x0000005c. Was 0xcd instead of 0x66
diff 93 address 0x0000005d. Was 0x29 instead of 0x69
diff 94 address 0x0000005e. Was 0x00 instead of 0x6c
diff 95 address 0x0000005f. Was 0x08 instead of 0x65
diff 96 address 0x00000060. Was 0xd1 instead of 0x20
diff 97 address 0x00000061. Was 0x29 instead of 0x20
diff 98 address 0x00000062. Was 0x00 instead of 0x20
diff 99 address 0x00000063. Was 0x08 instead of 0x20
diff 100 address 0x00000064. Was 0xd5 instead of 0x47
diff 101 address 0x00000065. Was 0x29 instead of 0x50
diff 102 address 0x00000066. Was 0x00 instead of 0x49
diff 103 address 0x00000067. Was 0x08 instead of 0x4f
diff 104 address 0x00000068. Was 0xd9 instead of 0x2f
diff 105 address 0x00000069. Was 0x29 instead of 0x47
diff 106 address 0x0000006a. Was 0x00 instead of 0x50
diff 107 address 0x0000006b. Was 0x08 instead of 0x49
diff 108 address 0x0000006c. Was 0xdd instead of 0x4f
diff 109 address 0x0000006d. Was 0x29 instead of 0x5f
diff 110 address 0x0000006e. Was 0x00 instead of 0x45
diff 111 address 0x0000006f. Was 0x08 instead of 0x58
diff 112 address 0x00000070. Was 0xe1 instead of 0x54
diff 113 address 0x00000071. Was 0x29 instead of 0x49
diff 114 address 0x00000072. Was 0x00 instead of 0x2f
diff 115 address 0x00000073. Was 0x08 instead of 0x53
diff 116 address 0x00000074. Was 0xe5 instead of 0x72
diff 117 address 0x00000075. Was 0x29 instead of 0x63
diff 118 address 0x00000076. Was 0x00 instead of 0x2f
diff 119 address 0x00000077. Was 0x08 instead of 0x6d
diff 120 address 0x00000078. Was 0xe9 instead of 0x61
diff 121 address 0x00000079. Was 0x29 instead of 0x69
diff 122 address 0x0000007a. Was 0x00 instead of 0x6e
diff 123 address 0x0000007b. Was 0x08 instead of 0x2e
diff 124 address 0x0000007c. Was 0xed instead of 0x63
diff 125 address 0x0000007d. Was 0x29 instead of 0x0d
diff 126 address 0x0000007e. Was 0x00 instead of 0x0a
diff 127 address 0x0000007f. Was 0x08 instead of 0x20
More than 128 errors, the rest are not printed.

    • Verify Failed **

shutdown command invoked


Even while debugging i am also getting the below mentioned problem:

Error in final launch sequence
Failed to execute MI command:
symbol-file /home/controller/Ac6/SystemWorkbench/STM32Cube_FW_L4_V1.8.0/STM32Cube_FW_L4_V1.8.1/Projects/STM32L476RG-Nucleo/Examples/GPIO/GPIO_EXTI/Src/main.c

Error message from debugger back end:
`/home/controller/Ac6/SystemWorkbench/STM32Cube_FW_L4_V1.8.0/STM32Cube_FW_L4_V1.8.1/Projects/STM32L476RG-Nucleo/Examples/GPIO/GPIO_EXTI/Src/main.c’: can’t read symbols: File format not recognized.

What could be the problem? Please help me.

Thanks

Hi Neham,

I never had this problem, but your first issue looks like the program is not being correctly downloaded to the board... Maybe the connection between your STLink and your target MCU is not ok. I can conclude that because the GDB debugger messages from STLink status looks OK (like target voltage, PID etc) and messages from MCU are saying thats something is wrong.

You can try to connect to your MCU via STLink Util (don’t know if there’s linux version) and try to make a “erase chip” and then a “blank check”. Try it, it should say something about the connection between your MCU and STLink.

For your second issue, I don’t know... Can you provide us some information about your “debugger settings”?
Project proprieties -> Run/Debug settings, TAB “debugger”

Thanks,

Danilo


Hi Danilo,

Thanks for the response.

For my first issue, I am not understanding the meaning of following sentense “Maybe the connection between your STLink and your target MCU is not ok.” because we only have our target board STM32L476-nucleo board which we have connected with our linux(ubuntu16.04) machine and Ac6 system workbench where we are tried to run/debug the existing c project(Existing example : GPIO IOtoggle). Is STLink any hardware or so to interface this board?

As per your suggestion, we have tried to install STLink utility. Unfortunately, this utility for linux is not available in stm official site(www.stm.com). so we tried to install using github by using following commands:

>> sudo apt-get install libusb-1.0-0-dev
>> git clone https://github.com/texane/stlinkQuestion stlink.git
>> cd stlink
>> make

but while running the above make command, system is either going to reboot or showing the below error:
/usr/bin/make : 1 : /usr/bin/make : cannot fork

so we could not install the STLink utility successfully. if any solution for this problem, Please let me know.

For second issue: In our debugger setting under debugger tab, following information are mentioned below:
Name : STM32L476RG_NUCLEO Debug
GDB command : ${openstm32_compiler_path}/arm-none-eabi-gdb
openOCD Command : “${openstm32_openocd_path}/openocd”

and so on..

Please refer the attached screenshot for more debug setting information.

Thanks


Hi Neham,

In your case, the STLink is embedded to your Nucleo board. On Nucleo board you can use the embedded STLink to program the MCU on Nucleo board or you can use your Nucleo board as a STLink.

Refer to this document (your Nucleo Board user manual)
http://www.st.com/content/ccc/resource/technical/document/user_manual/98/2e/fa/4b/e0/82/43/b7/DM00105823.pdf/files/DM00105823.pdf/jcr:content/translations/en.DM00105823.pdfQuestion

On section “6.2.3 Using the ST-LINK/V2-1 to program and debug the STM32 on board” and check if the jumpers is like described there. That jumpers make the connection between embedded STLink and the MCU (that is what I mean when said to you check the connection between STLink and MCU).

About your failed instalation of STLink Utillity on repo that you send (https://github.com/texane/stlink) on installation procedure is saying that this version is not compatible to Debian “For Debian Linux based distributions there is no package available in the standard repositories so you need to install from source yourself.”

But first try to check the jumpers, maybe it will solve your first issue.

For your second issue: everything looks OK on your screenshot... Reading the message from your first topic it looks like the GDB is not finding the debugger symbols

When looking at Project Explorer, do you have a “Debug” folder inside the workspace? It is created automatically and the debugger symbols is placed there after compile.

Hi Danilo,

Thanks for the response.

Jumpers (CN2 stlink jumber is on, JP5 U5v and JP6 are on and also no connection with CN4 for our board) which are making connection with STLink and MCU are all connected correctely(we refered the user manual also to cross check). Still, we are facing the same issue.

Even the debug folder is also creating in project explorer.

For second issue, can you please help us to find which project file we should keep in debugger setting under main tab in c/c++ Application. because we are getting error like “symbol-file:/home/controller/Ac6/SystemWorkbench/STM32Cube_FW_L4_V1.8.0/STM32Cube_FW_L4_V1.8.1/Projects/STM32L476RG-Nucleo/Examples/GPIO/GPIO_EXTI/Src/main.c can’t read symbols: File format not recognized.”. Actually in debugger setting under main tab in c/c++ Application, we are browsing main.c file in src folder of project explorer. And in the same location when we are clicking on search project, it not showing any things in the new window. Please let us know if we are chossing the correct c/c++ Application in debug configaration. Please find the attached screenshot for the above mentioned issues.

Please clarify the meaning of “your GDB is not able to find symbols”. because we are using the default Ac6 Stm32 debugger only.

Thanks.


Hi Neham,

Maybe there’s a relationship between your first issue and the second one.

Your C/C++ Application should be pointing to the .elf file generated on your Debug folder, like this: Debug/YourProjectName.elf

In your case I think is something like: Debug/STM32L476RG_NUCLEO.elf

Clarifying the meaning of “your GDB is not able to find symbols” is that Ac6 STM32 Debugger is GDB, and as you are pointing to a .c file GDB is not finding the debug symbols... The debug symbols is inside .elf file

I think everything should be solved pointing to the right .elf file

Danilo

Hi Dalino,

Thanks a lot.

We are not able to locate .elf file anywhere in our project. After building our project, in debug folder of our project explorer, there are only .mk files but not .elf file. Anyway we searched .elf in our whole project, instead of STM32L476RG_NUCLEO.elf we found STM32L476RG_NUCLEO.elf.launch file in the location “/home/controller/Ac6/SystemWorkbench/STM32Cube_FW_L4_V1.8.0/STM32Cube_FW_L4_V1.8.1/Projects/STM32L476RG-Nucleo/Examples/GPIO/GPIO_EXTI/TrueSTUDIO/STM32L476RG_NUCLEO”.

I dont know why .elf file is not generating after building our project successfully? please suggest

one more thing to clarify, whenever we are building our project, in Debugger configuration under debugger tab, “STM32L476RG_FLASH.ld” file is loaded automatically instead of .elf file. and it is showing the same error - Error in final launch sequence
Failed to execute MI command:
symbol-file /home/controller/Ac6/SystemWorkbench/STM32Cube_FW_L4_V1.8.0/STM32Cube_FW_L4_V1.8.1/Projects/STM32L476RG-Nucleo/Examples/GPIO/GPIO_EXTI/TrueSTUDIO/STM32L476RG_NUCLEO/STM32L476RG_FLASH.ld

Error message from debugger back end:
`/home/controller/Ac6/SystemWorkbench/STM32Cube_FW_L4_V1.8.0/STM32Cube_FW_L4_V1.8.1/Projects/STM32L476RG-Nucleo/Examples/GPIO/GPIO_EXTI/TrueSTUDIO/STM32L476RG_NUCLEO/STM32L476RG_FLASH.ld’: can’t read symbols: File format not recognized.

Please find the attached screenshot of debug folder having only .mk file not .elf file.

Thanks

Hi Danilo,

I am not able to locate .elf file in debug folder after running the project.

Please help me with this issue.

Thanks