Inlined STM8S SPL (STM8S103) for use with SDCC

CMakeLists.txt.clion 674B

12345678910111213141516171819202122232425262728
  1. cmake_minimum_required(VERSION 3.7)
  2. project(stm8 C)
  3. project(STM8S)
  4. set(CMAKE_CXX_STANDARD GNU99)
  5. add_definitions(
  6. -DSKIP_TRAPS=1
  7. -DSTM8S103
  8. -D__SDCC__
  9. -D_SDCC_
  10. -DINTERRUPT=
  11. -D__interrupt\(n\)=__attribute__\(\(interrupt\(n\)\)\)
  12. -D__SDCC)
  13. # User program
  14. include_directories(User)
  15. include_directories(Library/SPL)
  16. #include_directories(Libraries/SPL/inc)
  17. file(GLOB_RECURSE USER_SOURCES "User/*.c" "User/*.h")
  18. file(GLOB_RECURSE LIB_SOURCES "Library/SPL/*.h")
  19. # Systemmake
  20. include_directories(/usr/share/sdcc/include/)
  21. link_directories(/usr/share/sdcc/include/)
  22. add_executable(firmware ${USER_SOURCES} ${LIB_SOURCES})