ARM project creation

Sysprogs forums Forums VisualGDB ARM project creation

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #23034
    MystikReasons
    Participant

    When I create a program with VisualGDB for the ARM toolchain it isn’t creating every file I needed.

    My example: I created a default blink project with HAL with the microcontroller: STM32F411RE

    It comes with the device-specific files (HAL*.h*), stm32.props, stm32f4xx_hal_conf.h, device_specific_file (HAL*.c*), LEDBlink.c and the system_stm32f4xx.c

    If I now try to initialize my own I2C HAL and start the debugger it jumps into the startup_stm32f11xe.c on line 23 and the comment in the function (see screenshot #1):  //If you hit the breakpoint below, one of the interrupts was unhandled in your code.
    //Define the following function in your code to handle it:
    // extern “C” void HardFault_Handler();

     

    If I now create the same project with the same parameters in uVision5 I get more files: stm32f4xx_it.c & stm32f4xx_hal_msp.c (see screenshot #2 – I didnt include my own i2c and bm280 files so don’t worry about them not showing up)

    In the stm32f4xx_it.c are many handlers defined also the HardFault_Handler in which I get stuck in my VisualGDB project cause its not existing.

    Is this a bug that this file isn’t being created in VisualGDB?

    And if this is a bug are there other files which are also not being created and are also other microcontroller affected by this “bug”?

    Attachments:
    You must be logged in to view attached files.
    #23037
    MystikReasons
    Participant

    Update: Tried to add stm32f4xx_it.c e and got two errors: main.h and stm32f4xx_it.h are also missing (VisualGDB is also not creating this file)

    #23044
    support
    Keymaster

    Hi,

    Are you using the GCC ARM toolchain or the Keil ARM toolchain (that is supported since v5.4 Preview 10)?

    #23045
    MystikReasons
    Participant

    I’m using the GCC ARM toolchain

    Question on the side: What does the adress mean in the “Inline GDB Stub Output” window?

    And is there an option to see whats in the adress?

    Example: halted: PC: 0xffffffffe

    #23047
    support
    Keymaster

    Hi,

    The files you mentioned are generated by the STM32CubeMX tool and can be imported into VisualGDB as shown in this tutorial. They are indeed not a part of the basic project templates.

    The “Inline GDB Stub Output” window contains text sent to the gdb session by the gdb stub (e.g. OpenOCD or Segger J-Link) and typically contains error and warning messages (sometimes repeating the regular stub output).

    You can use the Memory window to view the memory contents at a specific address.

    #23058
    MystikReasons
    Participant

    Hello,

    Thank you for the link for the tutorial now they are being created and I dont have the error anymore.

    Why aren’t they part of the basic project templates? Aren’t they necessary files?

    And thank you for the explanation about the function of the “Inline GDB Stub Output” window.

    #23060
    MystikReasons
    Participant

    My problem right now is that I cant create a C++ project with STM32CubeMX but with VisualGDB I can.

    So I always have to add the missing files manually

    #23062
    support
    Keymaster

    Hi,

    VisualGDB-generated projects contain all necessary code inside the main .c or .cpp file, hence they do not need separate _it.c and main.h files.

    If you get errors due to missing _it.c file, most likely you have replaced the main source file with the main file from another project that also includes the _it.c and main.h files. If this is the case, please ensure you copy ALL the relevant files from the project you are trying to import.

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