Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

Unkown hardfault when running C++ on B-L072Z-LRWAN1 #116

@Dond96

Description

@Dond96

This is an issue I ran into earlier but haven't reported yet I just continued in C.
When trying to build an application with the stack using C++ for the B-L072Z-LRWAN1 it crashes before calling the bootstrap function. I had to figure this out using a debugger. The debugger doesn't give much information about the crash. The code does compile it just crashes runtime. I've also added a picture of the callstack the debugger shows and the local variables of the __hardfault_handler function of stm32_common_system.c where the reason of the crash is "optimized out".

extern "C"
{
  #include "d7ap.h"
  #include "d7ap_fs.h"
  #include "log.h"

  void bootstrap()
  {
    d7ap_fs_init();
    d7ap_init();
    log_print_string("Test");
  }
}

afbeelding

stack in the __hardfault_handler function
afbeelding

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions