Add firmware code to repo (#8)
* Added primary stepper motor driver code to repo * Added odometery encoder code to repo * Added the ability to update encoder wheel ratio via ros service Co-authored-by: Pimpest <82343504+Pimpest@users.noreply.github.com> Co-committed-by: Pimpest <82343504+Pimpest@users.noreply.github.com>
This commit is contained in:
50
firmware/base/CMakeLists.txt
Normal file
50
firmware/base/CMakeLists.txt
Normal file
@ -0,0 +1,50 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
set(PICO_BOARD pico CACHE STRING "Board type")
|
||||
set(TOP ${PICO_TINYUSB_PATH})
|
||||
include(pico_sdk_import.cmake)
|
||||
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
project(wheelbase C CXX ASM)
|
||||
|
||||
pico_sdk_init()
|
||||
|
||||
|
||||
add_executable(wheelbase
|
||||
src/quadrature.c
|
||||
src/main.c
|
||||
src/stepper.c
|
||||
tusb/tusb_descriptors.c
|
||||
)
|
||||
|
||||
pico_set_program_name(wheelbase "wheelbase")
|
||||
pico_set_program_version(wheelbase "0.1")
|
||||
|
||||
pico_enable_stdio_uart(wheelbase 0)
|
||||
pico_enable_stdio_usb(wheelbase 1)
|
||||
|
||||
pico_generate_pio_header(wheelbase ${CMAKE_CURRENT_LIST_DIR}/pio/quadrature.pio)
|
||||
pico_generate_pio_header(wheelbase ${CMAKE_CURRENT_LIST_DIR}/pio/blink.pio)
|
||||
|
||||
target_link_libraries(wheelbase
|
||||
pico_stdlib
|
||||
pico_stdio
|
||||
pico_time
|
||||
pico_multicore
|
||||
hardware_pio
|
||||
hardware_clocks
|
||||
hardware_gpio
|
||||
hardware_sync
|
||||
tinyusb_board
|
||||
tinyusb_device)
|
||||
|
||||
target_include_directories(wheelbase PRIVATE
|
||||
${CMAKE_CURRENT_LIST_DIR}
|
||||
src/
|
||||
tusb/
|
||||
)
|
||||
|
||||
pico_add_extra_outputs(wheelbase)
|
||||
Reference in New Issue
Block a user