Giter Club home page Giter Club logo

Comments (2)

devanlai avatar devanlai commented on May 30, 2024

As per the discussion on Gitter, it is possible that there is a conflict where the bootloader has configured peripheral registers that the CubeMX HAL expects to still be at their initial reset values. The obvious area of conflict would be the core system clock configuration and the SysTick, though I would expect it to tick at the wrong rate, rather than failing to tick at all.

I would suggest using a debugger that has support for viewing peripheral registers (using a CMSIS-SVD file), placing a breakpoint at the call to HAL_Delay(), and comparing the values of all major peripheral registers in the case where it works (without the bootloader, or with a pared down bootloader) vs the case where it does not work with the bootloader.

Assuming it is a peripheral conflict, you could then implement a target_pre_main() function to ensure that those peripherals are correctly reset before launching your application.

Depending on the scope of the changes needed, it would also be possible to roll those changes into the core bootloader code, but I don't have CubeMX setup, so it would be a bit difficult for me to test.

from dapboot.

NKelias avatar NKelias commented on May 30, 2024

Turns out it has nothing to do with the bootloader. STM libraries (HAL as well as StdPeriph) hard-code the IRQ vector table address to 0x8000000. They need to have the offset explicitly defined in the VECT_TAB_OFFSET parameter (for HAL) and don't read them from the linker script.

from dapboot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.