add large assembly code to a Zephyr project

Hi, I have a nRF5340 Development Kit. I want to add a large amount of assembly code from a previous Cortex M4 project (from PSoC Creator 4.2). Project has *.s files and *.h files.

How can I adapt the assembly code into the Zephyr project? Where I can find the documentation that shows me how to add assembly code to a Zephyr project?

I don't know if is important, I use Visual Code Studio for development and started from echo project (because this project is using I2S peripheral).

Thank you.

Parents
  • Hello, 

    Please note that the nRF5340 SoC has two ArmRegistered CortexRegistered-M33 processors:

    • 128/64 MHz Arm Cortex-M33 application processor with 1 MB Flash & 512 KB RAM
    • 64 MHz Arm Cortex-M33 network processor with 256 KB Flash & 64 KB RAM

    You will need to make sure that the assembly code is compliant with the M33 processors. 

    Regarding assembly in the Zephyr project, it should be fully compatible with the os. Please see Application Development in the Zephyr OS

    • main.c: A source code file. Applications typically contain source files written in C, C++, or assembly language. The Zephyr convention is to place them in a subdirectory of <app> named src.

    Kind regards,
    Øyvind

  • Hello, Thank you for your answer.

    I forgot the highlight that my code has to reside on the Application processor.

    BTW: how do I know what source code is compiled for one Code and what code is compiled for the other?

    I read that sentence ... but is not clear for me how?

    I create a new *.s file and what should I write in order to define a function? 

    Do you have any link to documentation related to: how to write ASM code (not in line ... because I have a large amount of ASM code).?

    Thank you.

Reply
  • Hello, Thank you for your answer.

    I forgot the highlight that my code has to reside on the Application processor.

    BTW: how do I know what source code is compiled for one Code and what code is compiled for the other?

    I read that sentence ... but is not clear for me how?

    I create a new *.s file and what should I write in order to define a function? 

    Do you have any link to documentation related to: how to write ASM code (not in line ... because I have a large amount of ASM code).?

    Thank you.

Children
Related