How to include assembly files forcelly for baremetal embedded target

4 views
Skip to first unread message

大西創也

unread,
Sep 7, 2025, 1:17:04 AM (10 days ago) Sep 7
to ThrowTheSwitch Forums
Hi, 

I want to run unit test on target simulator, so attach fundamental assembly files like cstart.asm by adding TEST_SOURCE_FILE in each unit test .c files.
This works fine, but it is also boilerplate code.

That's why I want to include those assembly files as building object target for all unit test in some way like writing config to project.yml.

I have already tried some workarounds, but those did not work.
- include .h file gathering TEST_SOURCE_FILE
- add macro that expands TEST_SOURCE_FILE 

My project.yml's assembly file related part is below.

```
:test_build:
  :use_assembly: TRUE

:extension:
  :assembly: ".asm"

:paths:
  :support:
    - test/support
  :include:
    - test/support

:files:
  :assembly:
    - src/asm/cstart.asm
    - src/asm/hdwinit.asm
    - src/asm/stkinit.asm
```

Thanks.
Reply all
Reply to author
Forward
0 new messages