Sysprogs forums › Forums › VisualGDB › How to create an empty project for stm32 correctly
- This topic has 12 replies, 2 voices, and was last updated 4 years, 2 months ago by support.
-
AuthorPosts
-
February 29, 2020 at 15:45 #27501AleksandrParticipant
Hello.
Trying to create an empty project.
It compiles without errors:
c:/sysgcc/arm-eabi/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: cannot find entry symbol Reset_Handler; defaulting to 0800010c
——————- Memory utilization report ——————-
Used FLASH: 3828 bytes out of 3828 bytes (100%)
Used RAM: 2680 bytes out of 2680 bytes (100%)========== Project Build Summary ==========
EmbeddedProject1 built in 00:02
========== Build: 1 Succeeded, 0 Failed ==========But when you try to run the debugger, it fails.
Open On-Chip Debugger 0.10.0 (2020-01-14) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
WARNING: interface/stlink-v2.cfg is deprecated, please switch to interface/stlink.cfg
Info : auto-selecting first available session transport “hla_swd”. To override use ‘transport select <transport>’.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : clock speed 1000 kHz
Info : STLINK v2 JTAG v32 API v2 SWIM v7 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.240238
Error: init mode failed (unable to connect to the target)Although in the debugger settings, the test is successful.
I also use my stm32 initial initialization file.
Please, help me set up an empty project for stm32.
February 29, 2020 at 16:57 #27502supportKeymasterHi,
It looks like the project is missing some components (e.g. interrupt vector table or a reset handler). Please make sure you include them in the project.
The easiest way to do it would be to start with a non-empty project and remove all extra components from VisualGDB Project Properties -> Embedded Frameworks, and also remove everything from the main file.
February 29, 2020 at 21:29 #27511AleksandrParticipantPerhaps the reason is that I use a dynamic interrupt table from RAM.
Where in VisualGDB point to my .cpp file with initialization (interrupt vector table and a reset handler).
February 29, 2020 at 22:42 #27512supportKeymasterHi,
You can add new files to your project same way as for regular VS projects: right-click on the project node in Solution Explorer and select Add->Existing Item.
March 1, 2020 at 06:58 #27516AleksandrParticipantIt’s too simple, but it doesn’t work that way(The screenshot in the attachment).
And also if create a project from the example, and delete third-party files, as well as disable third-party libraries in the settings, then there are many HAL libraries in the dependencies, but I need to get a project where only CMSIS and my libraries are used.
Attachments:
You must be logged in to view attached files.March 1, 2020 at 17:55 #27524supportKeymasterLooks like you did not follow our instructions about creating a project and removing the libraries via VisualGDB Project Properties -> Embedded Frameworks and instead created a project without a linker script and other compiler/linker-level settings. Please make sure you follow those instructions.
March 1, 2020 at 19:16 #27527AleksandrParticipantCan I ask you for full instructions on creating an empty project and using the interrupt vector table from RAM? As my multiple attempts have not crowned success((
March 1, 2020 at 19:26 #27528supportKeymasterSorry, this is not covered by our technical support. Please refer to the STM32 documentation for further details.
March 1, 2020 at 19:27 #27529AleksandrParticipanthttps://yadi.sk/d/GNkCNVfKnlurXA
Here is my project, check it please, what is done wrong.
March 2, 2020 at 05:33 #27531AleksandrParticipantPlease tell me how I can enable creation .map file?
March 3, 2020 at 20:30 #27543supportKeymasterNo problem. Please share a screenshot of the entire VS window showing your solution and also a screenshot of the Help->About VisualGDB window and we will help you find the right setting.
March 4, 2020 at 14:04 #27554AleksandrParticipantscreenshots in the attachment
Attachments:
You must be logged in to view attached files.March 6, 2020 at 17:16 #27579supportKeymasterThanks, looks like you are using an MSBuild-based project.
Please refer to the following tutorial for an example on enabling the map files: https://visualgdb.com/tutorials/arm/linkerscripts/ -
AuthorPosts
- You must be logged in to reply to this topic.