riscvarchive / risc-v-getting-started-guide

The official RISC-V getting started guide
https://risc-v-getting-started-guide.readthedocs.io/en/latest/
Creative Commons Attribution 4.0 International
198 stars 56 forks source link

update zephyr SDK version #20

Closed KodyKantor closed 4 years ago

KodyKantor commented 4 years ago

I was going through the documentation to run the risc-v demo and hit an issue that the zephyr-sdk was too old:

$ cmake -DBOARD=qemu_riscv32 $ZEPHYR_BASE/samples/hello_world
Zephyr version: 2.1.99
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.7.3", minimum required is "3.6")
-- Selected BOARD qemu_riscv32
CMake Error at /home/kkantor/zephyr/cmake/toolchain/zephyr/host-tools.cmake:49 (message):
  The SDK version you are using is too old, please update your SDK.

  You need at least SDK version 0.10.3.
  You have version 0.10.0 (/home/kkantor/zephyr-sdk).
  The new version of the SDK can be downloaded from:

  https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.10.3/zephyr-sdk-0.10.3-setup.run

Call Stack (most recent call first):
  /home/kkantor/zephyr/cmake/host-tools.cmake:3 (include)
  /home/kkantor/zephyr/cmake/app/boilerplate.cmake:443 (include)
  CMakeLists.txt:5 (include)

-- Configuring incomplete, errors occurred!

To test this I built the HTML documentation and pasted the modified instructions into my terminal:

$ export ZEPHYR_SDK_VERSION="0.10.3"
$ wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v$ZEPHYR_SDK_VERSION/zephyr-sdk-$ZEPHYR_SDK_VERSION-setup.run
[...]
HTTP request sent, awaiting response... 200 OK
Length: 1143070277 (1.1G) [application/octet-stream]
Saving to: ‘zephyr-sdk-0.10.3-setup.run’

zephyr-sdk-0.10.3-setup.run    100%[==================================================>]   1.06G  10.6MB/s    in 1m 42s

2019-12-26 10:18:29 (10.7 MB/s) - ‘zephyr-sdk-0.10.3-setup.run’ saved [1143070277/1143070277]
$ sudo sh zephyr-sdk-$ZEPHYR_SDK_VERSION-setup.run -- -d $ZEPHYR_SDK_INSTALL_DIR
Verifying archive integrity... All good.
[...]

Rendered HTML also looks fine:

zephyr_version_update
KodyKantor commented 4 years ago

I should add that the risc-v 'hello world' sample appears to run fine on zephyr 0.10.3:

[QEMU] CPU: riscv32
*** Booting Zephyr OS build zephyr-v2.1.0-581-g4e135d76a3c2  ***
Hello World! qemu_riscv32
QEMU: Terminated
[100%] Built target run
KodyKantor commented 4 years ago

@mgielda do you think you could take a look at this change? It should be good to go. Thank you.