Skip to content

Fix README formatting and enhance Zephyr application instructions#121

Open
nayakned wants to merge 2 commits intoCOVESA:mainfrom
nayakned:update/readme
Open

Fix README formatting and enhance Zephyr application instructions#121
nayakned wants to merge 2 commits intoCOVESA:mainfrom
nayakned:update/readme

Conversation

@nayakned
Copy link
Copy Markdown
Collaborator

No description provided.

Signed-off-by: Naresh Nayak <Naresh.Nayak@hs-furtwangen.de>
Comment thread examples/acf-can/zephyr/README.md Outdated
```

## Testing on native_sim
To test on native sim, we first create an Ethernet interface and a CAN inzterface for the sim.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wenn du eh gerade korrigierst, hier steht noch CAN "inzterface"

Signed-off-by: Naresh Nayak <Naresh.Nayak@hs-furtwangen.de>
Copy link
Copy Markdown
Collaborator

@SebastianSchildt SebastianSchildt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The interface needs to be "vcan0" instead of zcan, the I got native_sim to run.

The suggested native_sim compile line

west build -b native_sim -d build_native_sim . -- -DCONF_FILE=examples/acf-can/zephyr/prj.conf -DOPEN1722_ZEPHYR_APP=acf-can-bridge -DDTC_OVERLAY_FILE=examples/acf-can/zephyr/boards/native_sim.overlay # For native_sim

Fails on my (arm) machine with

Make Error at /root/zephyrproject/zephyr/arch/posix/aarch64.cmake:28 (message):
  CONFIG_64BIT=n but this Aarch64 machine has a 64-bit userspace.

  If you were targeting native_sim, target native_sim/native/64 instead.

  Otherwise, be sure to define CONFIG_64BIT appropriately.

Call Stack (most recent call first):
  /root/zephyrproject/zephyr/arch/posix/CMakeLists.txt:58 (include)

This an be fixed with

west build -b native_sim/native/64 -d build_native_sim . -- -DCONF_FILE=examples/acf-can/zephyr/prj.conf -DOPEN1722_ZEPHYR_APP=acf-can-bridge -DDTC_OVERLAY_FILE=examples/acf-can/zephyr/boards/native_sim.overlay

I suggest listing both variants (first, I have e not tested 64bot on intel, and in any case building "native" in 32 bit might still be useful as most embedded targets are 32 bit)

Also I found west build -t run can not be used to to run nativesim, instead I needed to do

./build_native_sim/zephyr/zephyr.exe

(yes even on Linux it was called .exe)

So maybe add that option

Comment on lines +31 to +32
```
$ west build -b native_sim -d build_native_sim . -- -DCONF_FILE=examples/acf-can/zephyr/prj.conf -DOPEN1722_ZEPHYR_APP=acf-can-bridge -DDTC_OVERLAY_FILE=examples/acf-can/zephyr/boards/native_sim.overlay # For native_sim
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest doing to seperate code blocks

xxx

for native_sime and normal host, because then the "copy" icon from GH is more useful (nobody needs both lines). Similarly t prevent people from needing to edit, remove the leading '$'

(Bonus: also rmeove the '$' from the Zepyhr sourcing a few lines up)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants