Giter Club home page Giter Club logo

Comments (7)

dgarske avatar dgarske commented on July 22, 2024

Hi @ProyMonit ,

It looks like Keil uses __asm() syntax. See: http://www.keil.com/support/man/docs/armcc/armcc_chr1359124246903.htm

Can you try altering this inline assembly to use __asm() or __asm volatile() and see if it resolves the compiler error?

Thanks,
David Garske, wolfSSL

from wolfboot.

ProyMonit avatar ProyMonit commented on July 22, 2024

Thanks for your fast reply. I will try your suggestion and let you know as soon as I can. Best regards.

from wolfboot.

danielinux avatar danielinux commented on July 22, 2024

Hello @ProyMonit - could you confirm that switching to __asm volatile() instruction fixes the error with keil? If this is the case we could prepare a specific fix for that compiler.

Thanks in advance,

D.

from wolfboot.

ProyMonit avatar ProyMonit commented on July 22, 2024

Hello, sorry the delayed reply. I tried the suggested fix but it didn't work. Instead I searched a bit more and finally used this syntax:

__asm volatile
    (
        "msr msp, app_end_stack"
    );

This last code segment solved the compilation issue. Thanks a lot for the support. Best regards. Yosmany.

from wolfboot.

danielinux avatar danielinux commented on July 22, 2024

@ProyMonit Thanks! I will provide a fix ASAP.

/d

from wolfboot.

danielinux avatar danielinux commented on July 22, 2024

Hello @ProyMonit - I'm trying to add support for Keil. What I've done so far is in the following branch:
https://github.com/wolfSSL/wolfBoot/tree/keil

The assembly error seems to be gone when I define asm as __asm when this compiler is detected. The version I'm using is MDK-Lite 5.31.0.0

However, there are a few things about the Keil microVision compiler that are not clear to me, e.g. how to place a custom interrupt vector and initialize all the memory sections at startup like we do with other compilers (gcc, IAR, etc.).

For now the branch is linking a wolfBoot as it were an high-level embedded application using the CMSIS startup code and the built-in reset service routine. The basic case may be working, but many features and platforms won't be properly supported through Keil, and the security of the bootloader may be compromised if the entire boot process is not under direct control of the bootloader code.

The proposed workaround to make wolfBoot work with Keil at the moment consists in commenting out the interrupt vector table in boot_arm.c and the isr_reset function which is normally used as entry point, but I would prefer to define the memory regions at link time and use the interrupt vector configuration and functions defined in wolfBoot. Please see the aforementioned branch for details.

Do you know instead a proper way to implement custom start-up using this tool? Are you using a custom "scatter file" (.sct) for wolfBoot in order to define the required symbols for start/end data/bss and the END_STACK pointer that is placed right before the IV?

Could you please share the project files and the scatter file that you are currently using to compile wolfBoot in Keil, so that we can include and maintain the support in the future versions?

Thanks!

from wolfboot.

danielinux avatar danielinux commented on July 22, 2024

Closing - missing information about the report. @ProyMonit feel free to reopen if you are able to share project/scatter files for Keil.

from wolfboot.

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.