How to create an empty project for stm32 correctly

Sysprogs forums Forums VisualGDB How to create an empty project for stm32 correctly

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #27501
    Aleksandr
    Participant

    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.

    #27502
    support
    Keymaster

    Hi,

    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.

    #27511
    Aleksandr
    Participant

    Perhaps 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).

    #27512
    support
    Keymaster

    Hi,

    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.

    #27516
    Aleksandr
    Participant

    It’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.
    #27524
    support
    Keymaster

    Looks 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.

    #27527
    Aleksandr
    Participant

    Can 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((

     

    #27528
    support
    Keymaster

    Sorry, this is not covered by our technical support. Please refer to the STM32 documentation for further details.

    #27529
    Aleksandr
    Participant

    https://yadi.sk/d/GNkCNVfKnlurXA

    Here is my project, check it please, what is done wrong.

    #27531
    Aleksandr
    Participant

    Please tell me how I can enable creation .map file?

    #27543
    support
    Keymaster

    No 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.

    #27554
    Aleksandr
    Participant

    screenshots in the attachment

    Attachments:
    You must be logged in to view attached files.
    #27579
    support
    Keymaster

    Thanks, 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/

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.