Skip to content

Commit

Permalink
Merge pull request #26 from kendryte/develop
Browse files Browse the repository at this point in the history
Release 0.5.0
  • Loading branch information
sunnycase authored Oct 19, 2018
2 parents 9c7b0e0 + 57d3809 commit ffc728b
Show file tree
Hide file tree
Showing 29 changed files with 575 additions and 288 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you want to start a new project, for instance, `hello_world`, you only need t

```shell
mkdir build && cd build
cmake .. -DPROJ=<ProjectName> -DTOOLCHAIN=/opt/riscv-toolchain/bin/ && make
cmake .. -DPROJ=<ProjectName> -DTOOLCHAIN=/opt/riscv-toolchain/bin && make
```

You will get 2 key files, `hello_world` and `hello_world.bin`.
Expand Down
14 changes: 7 additions & 7 deletions cmake/toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ endif()

message(STATUS "Using ${TOOLCHAIN} RISCV toolchain")

global_set(CMAKE_C_COMPILER "${TOOLCHAIN}riscv64-unknown-elf-gcc${EXT}")
global_set(CMAKE_CXX_COMPILER "${TOOLCHAIN}riscv64-unknown-elf-g++${EXT}")
global_set(CMAKE_LINKER "${TOOLCHAIN}riscv64-unknown-elf-ld${EXT}")
global_set(CMAKE_AR "${TOOLCHAIN}riscv64-unknown-elf-ar${EXT}")
global_set(CMAKE_OBJCOPY "${TOOLCHAIN}riscv64-unknown-elf-objcopy${EXT}")
global_set(CMAKE_SIZE "${TOOLCHAIN}riscv64-unknown-elf-size${EXT}")
global_set(CMAKE_OBJDUMP "${TOOLCHAIN}riscv64-unknown-elf-objdump${EXT}")
global_set(CMAKE_C_COMPILER "${TOOLCHAIN}/riscv64-unknown-elf-gcc${EXT}")
global_set(CMAKE_CXX_COMPILER "${TOOLCHAIN}/riscv64-unknown-elf-g++${EXT}")
global_set(CMAKE_LINKER "${TOOLCHAIN}/riscv64-unknown-elf-ld${EXT}")
global_set(CMAKE_AR "${TOOLCHAIN}/riscv64-unknown-elf-ar${EXT}")
global_set(CMAKE_OBJCOPY "${TOOLCHAIN}/riscv64-unknown-elf-objcopy${EXT}")
global_set(CMAKE_SIZE "${TOOLCHAIN}/riscv64-unknown-elf-size${EXT}")
global_set(CMAKE_OBJDUMP "${TOOLCHAIN}/riscv64-unknown-elf-objdump${EXT}")

execute_process(COMMAND ${CMAKE_C_COMPILER} -print-file-name=crt0.o OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE CRT0_OBJ)
execute_process(COMMAND ${CMAKE_C_COMPILER} -print-file-name=crtbegin.o OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE CRTBEGIN_OBJ)
Expand Down
Loading

0 comments on commit ffc728b

Please sign in to comment.