Merge remote-tracking branch 'upstream/edpt_ISO_xfer' into edpt_ISO_xfer
This commit is contained in:
14
examples/device/99-tinyusb.rules
Normal file
14
examples/device/99-tinyusb.rules
Normal file
@@ -0,0 +1,14 @@
|
||||
# Copy this file to the location of your distribution's udev rules, for example on Ubuntu:
|
||||
# sudo cp 99-tinyusb.rules /etc/udev/rules.d/
|
||||
# Then reload udev configuration by executing:
|
||||
# sudo udevadm control --reload-rules
|
||||
# sudo udevadm trigger
|
||||
|
||||
# Check SUBSYSTEM
|
||||
SUBSYSTEMS=="hidraw", KERNEL=="hidraw*", MODE="0666", GROUP="dialout"
|
||||
|
||||
# Rule applies to all TinyUSB example
|
||||
ATTRS{idVendor}=="cafe", MODE="0666", GROUP="dialout"
|
||||
|
||||
# Rule to blacklist TinyUSB example from being manipulated by ModemManager.
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="cafe", ENV{ID_MM_DEVICE_IGNORE}="1"
|
@@ -33,9 +33,6 @@ if(FAMILY STREQUAL "rp2040")
|
||||
CFG_TUSB_OS=OPT_OS_PICO
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
|
||||
pico_add_extra_outputs(${PROJECT})
|
||||
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
||||
endif()
|
||||
|
@@ -37,9 +37,6 @@ elseif(FAMILY STREQUAL "rp2040")
|
||||
CFG_TUSB_OS=OPT_OS_PICO
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
|
||||
pico_add_extra_outputs(${PROJECT})
|
||||
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
||||
endif()
|
||||
|
@@ -33,9 +33,6 @@ if(FAMILY STREQUAL "rp2040")
|
||||
CFG_TUSB_OS=OPT_OS_PICO
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
|
||||
pico_add_extra_outputs(${PROJECT})
|
||||
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
||||
endif()
|
||||
|
@@ -39,9 +39,6 @@ elseif(FAMILY STREQUAL "rp2040")
|
||||
CFG_TUSB_OS=OPT_OS_PICO
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
|
||||
pico_add_extra_outputs(${PROJECT})
|
||||
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
||||
endif()
|
||||
|
@@ -21,7 +21,7 @@
|
||||
build_treat_warnings_as_errors="Yes"
|
||||
c_additional_options="-Wno-error=undef;-Wno-error=unused-parameter;-Wno-error=cast-align;-Wno-error=cast-function-type"
|
||||
c_preprocessor_definitions="NRF52840_XXAA;__nRF_FAMILY;ARM_MATH_CM4;FLASH_PLACEMENT=1;CFG_TUSB_MCU=OPT_MCU_NRF5X;CFG_TUSB_DEBUG=1"
|
||||
c_user_include_directories="../../src;$(rootDir)/lib/CMSIS_4/CMSIS/Include;$(rootDir)/hw;$(rootDir)/src;$(nrfxDir)/..;$(nrfxDir);$(nrfxDir)/mdk;$(nrfxDir)/hal;$(nrfxDir)/drivers/include;$(nrfxDir)/drivers/src"
|
||||
c_user_include_directories="../../src;$(rootDir)/lib/CMSIS_5/CMSIS/Core/Include;$(rootDir)/hw;$(rootDir)/src;$(nrfxDir)/..;$(nrfxDir);$(nrfxDir)/mdk;$(nrfxDir)/hal;$(nrfxDir)/drivers/include;$(nrfxDir)/drivers/src"
|
||||
debug_register_definition_file="nrf52840_Registers.xml"
|
||||
debug_target_connection="J-Link"
|
||||
gcc_enable_all_warnings="Yes"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
include ../../../tools/top.mk
|
||||
include ../../make.mk
|
||||
|
||||
FREERTOS_SRC = lib/FreeRTOS/FreeRTOS/Source
|
||||
FREERTOS_SRC = lib/FreeRTOS-Kernel
|
||||
|
||||
INC += \
|
||||
src \
|
||||
|
@@ -20,7 +20,7 @@
|
||||
arm_target_interface_type="SWD"
|
||||
build_treat_warnings_as_errors="No"
|
||||
c_preprocessor_definitions="LPC175x_6x;__LPC1700_FAMILY;__LPC176x_SUBFAMILY;ARM_MATH_CM3;FLASH_PLACEMENT=1;CORE_M3;CFG_TUSB_MCU=OPT_MCU_LPC175X_6X"
|
||||
c_user_include_directories=".;../../src;$(rootDir)/hw;$(rootDir)/src;$(rootDir)/hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/inc;$(rootDir)/lib/FreeRTOS/Source/include;$(rootDir)/lib/FreeRTOS/Source/portable/GCC/ARM_CM3"
|
||||
c_user_include_directories=".;../../src;$(rootDir)/hw;$(rootDir)/src;$(rootDir)/hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/inc;$(rootDir)/lib/FreeRTOS-Kernel/include;$(rootDir)/lib/FreeRTOS-Kernel/portable/GCC/ARM_CM3"
|
||||
debug_register_definition_file="LPC176x5x_Registers.xml"
|
||||
debug_target_connection="J-Link"
|
||||
gcc_enable_all_warnings="Yes"
|
||||
@@ -92,39 +92,39 @@
|
||||
<folder Name="FreeRTOS">
|
||||
<folder Name="Source">
|
||||
<folder Name="include">
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/croutine.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/deprecated_definitions.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/event_groups.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/FreeRTOS.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/list.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/message_buffer.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/mpu_prototypes.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/mpu_wrappers.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/portable.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/projdefs.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/queue.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/semphr.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/stack_macros.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/StackMacros.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/stream_buffer.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/task.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/timers.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/croutine.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/deprecated_definitions.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/event_groups.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/FreeRTOS.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/list.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/message_buffer.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/mpu_prototypes.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/mpu_wrappers.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/portable.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/projdefs.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/queue.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/semphr.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/stack_macros.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/StackMacros.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/stream_buffer.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/task.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/timers.h" />
|
||||
</folder>
|
||||
<folder Name="portable">
|
||||
<folder Name="GCC">
|
||||
<folder Name="ARM_CM3">
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/portable/GCC/ARM_CM3/portmacro.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/portable/GCC/ARM_CM3/port.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/portable/GCC/ARM_CM3/portmacro.h" />
|
||||
</folder>
|
||||
</folder>
|
||||
<folder Name="MemMang">
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/portable/MemMang/heap_4.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/portable/MemMang/heap_4.c" />
|
||||
</folder>
|
||||
</folder>
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/list.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/queue.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/tasks.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/timers.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/list.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/queue.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/tasks.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/timers.c" />
|
||||
</folder>
|
||||
<file file_name="../../../../../lib/FreeRTOS/freertos_hook.c" />
|
||||
</folder>
|
||||
|
@@ -107,39 +107,39 @@
|
||||
<folder Name="FreeRTOS">
|
||||
<folder Name="Source">
|
||||
<folder Name="include">
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/croutine.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/deprecated_definitions.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/event_groups.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/FreeRTOS.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/list.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/message_buffer.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/mpu_prototypes.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/mpu_wrappers.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/portable.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/projdefs.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/queue.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/semphr.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/stack_macros.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/StackMacros.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/stream_buffer.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/task.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/timers.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/croutine.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/deprecated_definitions.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/event_groups.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/FreeRTOS.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/list.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/message_buffer.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/mpu_prototypes.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/mpu_wrappers.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/portable.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/projdefs.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/queue.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/semphr.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/stack_macros.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/StackMacros.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/stream_buffer.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/task.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/timers.h" />
|
||||
</folder>
|
||||
<folder Name="portable">
|
||||
<folder Name="GCC">
|
||||
<folder Name="ARM_CM4F">
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/portable/GCC/ARM_CM4F/port.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/portable/GCC/ARM_CM4F/portmacro.h" />
|
||||
</folder>
|
||||
</folder>
|
||||
<folder Name="MemMang">
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/portable/MemMang/heap_4.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/portable/MemMang/heap_4.c" />
|
||||
</folder>
|
||||
</folder>
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/list.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/queue.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/tasks.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/timers.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/list.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/queue.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/tasks.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/timers.c" />
|
||||
</folder>
|
||||
</folder>
|
||||
</folder>
|
||||
|
@@ -100,39 +100,39 @@
|
||||
<folder Name="FreeRTOS">
|
||||
<folder Name="Source">
|
||||
<folder Name="include">
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/croutine.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/deprecated_definitions.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/event_groups.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/FreeRTOS.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/list.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/message_buffer.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/mpu_prototypes.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/mpu_wrappers.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/portable.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/projdefs.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/queue.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/semphr.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/stack_macros.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/StackMacros.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/stream_buffer.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/task.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/timers.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/croutine.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/deprecated_definitions.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/event_groups.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/FreeRTOS.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/list.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/message_buffer.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/mpu_prototypes.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/mpu_wrappers.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/portable.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/projdefs.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/queue.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/semphr.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/stack_macros.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/StackMacros.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/stream_buffer.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/task.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/timers.h" />
|
||||
</folder>
|
||||
<folder Name="portable">
|
||||
<folder Name="GCC">
|
||||
<folder Name="ARM_CM0">
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/portable/GCC/ARM_CM0/port.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/portable/GCC/ARM_CM0/portmacro.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/portable/GCC/ARM_CM0/port.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/portable/GCC/ARM_CM0/portmacro.h" />
|
||||
</folder>
|
||||
</folder>
|
||||
<folder Name="MemMang">
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/portable/MemMang/heap_4.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/portable/MemMang/heap_4.c" />
|
||||
</folder>
|
||||
</folder>
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/list.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/queue.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/tasks.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/timers.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/list.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/queue.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/tasks.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/timers.c" />
|
||||
</folder>
|
||||
<file file_name="../../../../../lib/FreeRTOS/freertos_hook.c" />
|
||||
</folder>
|
||||
|
@@ -104,39 +104,39 @@
|
||||
<folder Name="FreeRTOS">
|
||||
<folder Name="Source">
|
||||
<folder Name="include">
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/croutine.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/deprecated_definitions.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/event_groups.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/FreeRTOS.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/list.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/message_buffer.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/mpu_prototypes.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/mpu_wrappers.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/portable.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/projdefs.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/queue.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/semphr.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/stack_macros.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/StackMacros.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/stream_buffer.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/task.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/include/timers.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/croutine.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/deprecated_definitions.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/event_groups.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/FreeRTOS.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/list.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/message_buffer.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/mpu_prototypes.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/mpu_wrappers.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/portable.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/projdefs.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/queue.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/semphr.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/stack_macros.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/StackMacros.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/stream_buffer.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/task.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/include/timers.h" />
|
||||
</folder>
|
||||
<folder Name="portable">
|
||||
<folder Name="GCC">
|
||||
<folder Name="ARM_CM4F">
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/portable/GCC/ARM_CM4F/port.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/portable/GCC/ARM_CM4F/portmacro.h" />
|
||||
</folder>
|
||||
</folder>
|
||||
<folder Name="MemMang">
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/portable/MemMang/heap_4.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/portable/MemMang/heap_4.c" />
|
||||
</folder>
|
||||
</folder>
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/list.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/queue.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/tasks.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS/Source/timers.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/list.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/queue.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/tasks.c" />
|
||||
<file file_name="../../../../../lib/FreeRTOS-Kernel/timers.c" />
|
||||
</folder>
|
||||
<file file_name="../../../../../lib/FreeRTOS/freertos_hook.c" />
|
||||
</folder>
|
||||
|
@@ -71,6 +71,7 @@ extern uint32_t SystemCoreClock;
|
||||
#define configUSE_TIME_SLICING 0
|
||||
#define configUSE_NEWLIB_REENTRANT 0
|
||||
#define configENABLE_BACKWARD_COMPATIBILITY 1
|
||||
#define configSTACK_ALLOCATION_FROM_SEPARATE_HEAP 0
|
||||
|
||||
#define configSUPPORT_STATIC_ALLOCATION 1
|
||||
#define configSUPPORT_DYNAMIC_ALLOCATION 0
|
||||
|
@@ -37,7 +37,7 @@ void vApplicationMallocFailedHook(void)
|
||||
TU_ASSERT(false, );
|
||||
}
|
||||
|
||||
void vApplicationStackOverflowHook(xTaskHandle pxTask, signed char *pcTaskName)
|
||||
void vApplicationStackOverflowHook(xTaskHandle pxTask, char *pcTaskName)
|
||||
{
|
||||
(void) pxTask;
|
||||
(void) pcTaskName;
|
||||
|
@@ -33,9 +33,6 @@ if(FAMILY STREQUAL "rp2040")
|
||||
CFG_TUSB_OS=OPT_OS_PICO
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
|
||||
pico_add_extra_outputs(${PROJECT})
|
||||
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
||||
endif()
|
||||
|
@@ -34,9 +34,6 @@ if(FAMILY STREQUAL "rp2040")
|
||||
CFG_TUSB_OS=OPT_OS_PICO
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
|
||||
pico_add_extra_outputs(${PROJECT})
|
||||
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
||||
endif()
|
||||
|
@@ -33,9 +33,6 @@ if(FAMILY STREQUAL "rp2040")
|
||||
CFG_TUSB_OS=OPT_OS_PICO
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
|
||||
pico_add_extra_outputs(${PROJECT})
|
||||
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
||||
endif()
|
||||
|
@@ -1,7 +1,7 @@
|
||||
include ../../../tools/top.mk
|
||||
include ../../make.mk
|
||||
|
||||
FREERTOS_SRC = lib/FreeRTOS/FreeRTOS/Source
|
||||
FREERTOS_SRC = lib/FreeRTOS-Kernel
|
||||
|
||||
INC += \
|
||||
src \
|
||||
|
@@ -71,6 +71,7 @@ extern uint32_t SystemCoreClock;
|
||||
#define configUSE_TIME_SLICING 0
|
||||
#define configUSE_NEWLIB_REENTRANT 0
|
||||
#define configENABLE_BACKWARD_COMPATIBILITY 1
|
||||
#define configSTACK_ALLOCATION_FROM_SEPARATE_HEAP 0
|
||||
|
||||
#define configSUPPORT_STATIC_ALLOCATION 1
|
||||
#define configSUPPORT_DYNAMIC_ALLOCATION 0
|
||||
|
@@ -37,7 +37,7 @@ void vApplicationMallocFailedHook(void)
|
||||
TU_ASSERT(false, );
|
||||
}
|
||||
|
||||
void vApplicationStackOverflowHook(xTaskHandle pxTask, signed char *pcTaskName)
|
||||
void vApplicationStackOverflowHook(xTaskHandle pxTask, char *pcTaskName)
|
||||
{
|
||||
(void) pxTask;
|
||||
(void) pcTaskName;
|
||||
|
@@ -33,9 +33,6 @@ if(FAMILY STREQUAL "rp2040")
|
||||
CFG_TUSB_OS=OPT_OS_PICO
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
|
||||
pico_add_extra_outputs(${PROJECT})
|
||||
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
||||
endif()
|
||||
|
@@ -33,9 +33,6 @@ if(FAMILY STREQUAL "rp2040")
|
||||
CFG_TUSB_OS=OPT_OS_PICO
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
|
||||
pico_add_extra_outputs(${PROJECT})
|
||||
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
||||
endif()
|
||||
|
@@ -33,9 +33,6 @@ if(FAMILY STREQUAL "rp2040")
|
||||
CFG_TUSB_OS=OPT_OS_PICO
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
|
||||
pico_add_extra_outputs(${PROJECT})
|
||||
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
||||
endif()
|
||||
|
@@ -34,9 +34,6 @@ if(FAMILY STREQUAL "rp2040")
|
||||
CFG_TUSB_OS=OPT_OS_PICO
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
|
||||
pico_add_extra_outputs(${PROJECT})
|
||||
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
||||
endif()
|
||||
|
@@ -80,9 +80,6 @@ if(FAMILY STREQUAL "rp2040")
|
||||
HTTPD_USE_CUSTOM_FSDATA=0
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
|
||||
pico_add_extra_outputs(${PROJECT})
|
||||
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
||||
endif()
|
||||
|
@@ -33,9 +33,6 @@ if(FAMILY STREQUAL "rp2040")
|
||||
CFG_TUSB_OS=OPT_OS_PICO
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
|
||||
pico_add_extra_outputs(${PROJECT})
|
||||
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
||||
endif()
|
||||
|
@@ -34,9 +34,6 @@ if(FAMILY STREQUAL "rp2040")
|
||||
CFG_TUSB_OS=OPT_OS_PICO
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
|
||||
pico_add_extra_outputs(${PROJECT})
|
||||
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
||||
endif()
|
||||
|
@@ -33,9 +33,6 @@ if(FAMILY STREQUAL "rp2040")
|
||||
CFG_TUSB_OS=OPT_OS_PICO
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
|
||||
pico_add_extra_outputs(${PROJECT})
|
||||
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
||||
endif()
|
||||
|
@@ -23,6 +23,26 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* This example demonstrates WebUSB as web serial with browser with WebUSB support (e.g Chrome).
|
||||
* After enumerated successfully, browser will pop-up notification
|
||||
* with URL to landing page, click on it to test
|
||||
* - Click "Connect" and select device, When connected the on-board LED will litted up.
|
||||
* - Any charters received from either webusb/Serial will be echo back to webusb and Serial
|
||||
*
|
||||
* Note:
|
||||
* - The WebUSB landing page notification is currently disabled in Chrome
|
||||
* on Windows due to Chromium issue 656702 (https://crbug.com/656702). You have to
|
||||
* go to landing page (below) to test
|
||||
*
|
||||
* - On Windows 7 and prior: You need to use Zadig tool to manually bind the
|
||||
* WebUSB interface with the WinUSB driver for Chrome to access. From windows 8 and 10, this
|
||||
* is done automatically by firmware.
|
||||
*
|
||||
* - On Linux/macOS, udev permission may need to be updated by
|
||||
* - copying '/examples/device/99-tinyusb.rules' file to /etc/udev/rules.d/ then
|
||||
* - run 'sudo udevadm control --reload-rules && sudo udevadm trigger'
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -149,52 +169,59 @@ void tud_resume_cb(void)
|
||||
bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_request_t const * request)
|
||||
{
|
||||
// nothing to with DATA & ACK stage
|
||||
if (stage != CONTROL_STAGE_SETUP ) return true;
|
||||
if (stage != CONTROL_STAGE_SETUP) return true;
|
||||
|
||||
if (request->bmRequestType_bit.type == TUSB_REQ_TYPE_VENDOR) {
|
||||
switch (request->bRequest)
|
||||
{
|
||||
case VENDOR_REQUEST_WEBUSB:
|
||||
// match vendor request in BOS descriptor
|
||||
// Get landing page url
|
||||
return tud_control_xfer(rhport, request, (void*) &desc_url, desc_url.bLength);
|
||||
switch (request->bmRequestType_bit.type)
|
||||
{
|
||||
case TUSB_REQ_TYPE_VENDOR:
|
||||
switch (request->bRequest)
|
||||
{
|
||||
case VENDOR_REQUEST_WEBUSB:
|
||||
// match vendor request in BOS descriptor
|
||||
// Get landing page url
|
||||
return tud_control_xfer(rhport, request, (void*) &desc_url, desc_url.bLength);
|
||||
|
||||
case VENDOR_REQUEST_MICROSOFT:
|
||||
if ( request->wIndex == 7 )
|
||||
case VENDOR_REQUEST_MICROSOFT:
|
||||
if ( request->wIndex == 7 )
|
||||
{
|
||||
// Get Microsoft OS 2.0 compatible descriptor
|
||||
uint16_t total_len;
|
||||
memcpy(&total_len, desc_ms_os_20+8, 2);
|
||||
|
||||
return tud_control_xfer(rhport, request, (void*) desc_ms_os_20, total_len);
|
||||
}else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
default: break;
|
||||
}
|
||||
break;
|
||||
|
||||
case TUSB_REQ_TYPE_CLASS:
|
||||
if (request->bRequest == 0x22)
|
||||
{
|
||||
// Webserial simulate the CDC_REQUEST_SET_CONTROL_LINE_STATE (0x22) to connect and disconnect.
|
||||
web_serial_connected = (request->wValue != 0);
|
||||
|
||||
// Always lit LED if connected
|
||||
if ( web_serial_connected )
|
||||
{
|
||||
// Get Microsoft OS 2.0 compatible descriptor
|
||||
uint16_t total_len;
|
||||
memcpy(&total_len, desc_ms_os_20+8, 2);
|
||||
board_led_write(true);
|
||||
blink_interval_ms = BLINK_ALWAYS_ON;
|
||||
|
||||
return tud_control_xfer(rhport, request, (void*) desc_ms_os_20, total_len);
|
||||
tud_vendor_write_str("\r\nTinyUSB WebUSB device example\r\n");
|
||||
}else
|
||||
{
|
||||
return false;
|
||||
blink_interval_ms = BLINK_MOUNTED;
|
||||
}
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
} else if (
|
||||
request->bmRequestType_bit.type == TUSB_REQ_TYPE_CLASS &&
|
||||
request->bRequest == 0x22) {
|
||||
// Webserial simulate the CDC_REQUEST_SET_CONTROL_LINE_STATE (0x22) to
|
||||
// connect and disconnect.
|
||||
web_serial_connected = (request->wValue != 0);
|
||||
// response with status OK
|
||||
return tud_control_status(rhport, request);
|
||||
}
|
||||
break;
|
||||
|
||||
// Always lit LED if connected
|
||||
if ( web_serial_connected ) {
|
||||
board_led_write(true);
|
||||
blink_interval_ms = BLINK_ALWAYS_ON;
|
||||
|
||||
tud_vendor_write_str("\r\nTinyUSB WebUSB device example\r\n");
|
||||
}else
|
||||
{
|
||||
blink_interval_ms = BLINK_MOUNTED;
|
||||
}
|
||||
|
||||
// response with status OK
|
||||
return tud_control_status(rhport, request);
|
||||
default: break;
|
||||
}
|
||||
|
||||
// stall unknown request
|
||||
|
0
examples/host/cdc_msc_hid/.only.MCU_RP2040
Normal file
0
examples/host/cdc_msc_hid/.only.MCU_RP2040
Normal file
43
examples/host/cdc_msc_hid/CMakeLists.txt
Normal file
43
examples/host/cdc_msc_hid/CMakeLists.txt
Normal file
@@ -0,0 +1,43 @@
|
||||
# use directory name for project id
|
||||
get_filename_component(PROJECT ${CMAKE_CURRENT_SOURCE_DIR} NAME)
|
||||
set(PROJECT ${BOARD}-${PROJECT})
|
||||
|
||||
# TOP is absolute path to root directory of TinyUSB git repo
|
||||
set(TOP "../../..")
|
||||
get_filename_component(TOP "${TOP}" REALPATH)
|
||||
|
||||
# Check for -DFAMILY=
|
||||
if(FAMILY STREQUAL "esp32s2")
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
include(${TOP}/hw/bsp/${FAMILY}/family.cmake)
|
||||
project(${PROJECT})
|
||||
|
||||
elseif(FAMILY STREQUAL "rp2040")
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
set(PICO_SDK_PATH ${TOP}/hw/mcu/raspberrypi/pico-sdk)
|
||||
include(${PICO_SDK_PATH}/pico_sdk_init.cmake)
|
||||
project(${PROJECT})
|
||||
pico_sdk_init()
|
||||
add_executable(${PROJECT})
|
||||
|
||||
include(${TOP}/hw/bsp/${FAMILY}/family.cmake)
|
||||
|
||||
# Example source
|
||||
target_sources(${PROJECT} PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/main.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/msc_app.c
|
||||
)
|
||||
|
||||
# Example include
|
||||
target_include_directories(${PROJECT} PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
|
||||
# Example defines
|
||||
target_compile_definitions(${PROJECT} PUBLIC
|
||||
CFG_TUSB_OS=OPT_OS_PICO
|
||||
)
|
||||
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid FAMILY specified")
|
||||
endif()
|
@@ -15,24 +15,14 @@ check_defined = \
|
||||
__check_defined = \
|
||||
$(if $(value $1),, \
|
||||
$(error Undefined make flag: $1$(if $2, ($2))))
|
||||
|
||||
# TODO Check if submodule haven't checkout yet
|
||||
fetch_submodule_if_empty = \
|
||||
ifeq ($(wildcard $(TOP)/$1/*),) \
|
||||
$(info $(shell git -C $(TOP) submodule update --init)) \
|
||||
endif
|
||||
|
||||
#-------------- Select the board to build for. ------------
|
||||
#BOARD_LIST = $(sort $(subst /.,,$(subst $(TOP)/hw/bsp/,,$(wildcard $(TOP)/hw/bsp/*/.))))
|
||||
#ifeq ($(filter $(BOARD),$(BOARD_LIST)),)
|
||||
# $(info You must provide a BOARD parameter with 'BOARD=', supported boards are:)
|
||||
# $(foreach b,$(BOARD_LIST),$(info - $(b)))
|
||||
# $(error Invalid BOARD specified)
|
||||
#endif
|
||||
|
||||
# Board without family
|
||||
BOARD_PATH := $(subst $(TOP)/,,$(wildcard $(TOP)/hw/bsp/$(BOARD)))
|
||||
ifneq ($(wildcard $(TOP)/hw/bsp/$(BOARD)/board.mk),)
|
||||
BOARD_PATH := hw/bsp/$(BOARD)
|
||||
FAMILY :=
|
||||
endif
|
||||
|
||||
# Board within family
|
||||
ifeq ($(BOARD_PATH),)
|
||||
@@ -42,6 +32,7 @@ ifeq ($(BOARD_PATH),)
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_PATH),)
|
||||
$(info You must provide a BOARD parameter with 'BOARD=')
|
||||
$(error Invalid BOARD specified)
|
||||
endif
|
||||
|
||||
@@ -56,6 +47,16 @@ endif
|
||||
|
||||
#TODO $(call fetch_submodule_if_empty,lib/sct_neopixel)
|
||||
|
||||
# Fetch submodules depended by family
|
||||
fetch_submodule_if_empty = \
|
||||
ifeq ($(wildcard $(TOP)/$1/*),) \
|
||||
$(info $(shell git -C $(TOP) submodule update --init $1)) \
|
||||
endif
|
||||
|
||||
ifdef DEPS_SUBMODULES
|
||||
$(foreach s,$(DEPS_SUBMODULES),:$(call fetch_submodule_if_empty,$(s)))
|
||||
endif
|
||||
|
||||
#-------------- Cross Compiler ------------
|
||||
# Can be set by board, default to ARM GCC
|
||||
CROSS_COMPILE ?= arm-none-eabi-
|
||||
@@ -65,13 +66,14 @@ CXX = $(CROSS_COMPILE)g++
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
SIZE = $(CROSS_COMPILE)size
|
||||
MKDIR = mkdir
|
||||
|
||||
ifeq ($(CMDEXE),1)
|
||||
CP = copy
|
||||
RM = del
|
||||
CP = copy
|
||||
RM = del
|
||||
else
|
||||
SED = sed
|
||||
CP = cp
|
||||
RM = rm
|
||||
SED = sed
|
||||
CP = cp
|
||||
RM = rm
|
||||
endif
|
||||
|
||||
#-------------- Source files and compiler flags --------------
|
||||
@@ -80,6 +82,8 @@ endif
|
||||
SRC_C += hw/bsp/board.c
|
||||
SRC_C += $(subst $(TOP)/,,$(wildcard $(TOP)/$(BOARD_PATH)/*.c))
|
||||
|
||||
INC += $(TOP)/$(FAMILY_PATH)
|
||||
|
||||
# Compiler Flags
|
||||
CFLAGS += \
|
||||
-ggdb \
|
||||
|
@@ -6,7 +6,9 @@
|
||||
.DEFAULT_GOAL := all
|
||||
|
||||
ifeq ($(FAMILY),esp32s2)
|
||||
# ---------------------------------------
|
||||
# Espressif IDF use CMake build system, this add wrapper target to call idf.py
|
||||
# ---------------------------------------
|
||||
|
||||
.PHONY: all clean flash
|
||||
|
||||
@@ -44,6 +46,9 @@ $(BUILD)/$(PROJECT).uf2: $(BUILD)/$(PROJECT).bin
|
||||
$(PYTHON) $(TOP)/tools/uf2/utils/uf2conv.py -f $(UF2_FAMILY_ID) -b 0x0 -c -o $@ $^
|
||||
|
||||
else ifeq ($(FAMILY),rp2040)
|
||||
# ---------------------------------------
|
||||
# RP2040 CMake
|
||||
# ---------------------------------------
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CMAKE_DEFSYM += -DCMAKE_BUILD_TYPE=Debug
|
||||
@@ -58,11 +63,14 @@ all: $(BUILD)
|
||||
clean:
|
||||
$(RM) -rf $(BUILD)
|
||||
|
||||
#flash: flash-pyocd
|
||||
flash:
|
||||
@$(CP) $(BUILD)/$(PROJECT).uf2 /media/$(USER)/RPI-RP2
|
||||
|
||||
else
|
||||
# ---------------------------------------
|
||||
# GNU Make build system
|
||||
# ---------------------------------------
|
||||
|
||||
# libc
|
||||
LIBS += -lgcc -lm -lnosys
|
||||
@@ -93,12 +101,11 @@ INC += $(TOP)/src
|
||||
|
||||
CFLAGS += $(addprefix -I,$(INC))
|
||||
|
||||
# TODO Skip nanolib for MSP430
|
||||
ifeq ($(BOARD), msp_exp430f5529lp)
|
||||
LDFLAGS += $(CFLAGS) -fshort-enums -Wl,-T,$(TOP)/$(LD_FILE) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections
|
||||
else
|
||||
LDFLAGS += $(CFLAGS) -fshort-enums -Wl,-T,$(TOP)/$(LD_FILE) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections -specs=nosys.specs -specs=nano.specs
|
||||
LDFLAGS += $(CFLAGS) -fshort-enums -Wl,-T,$(TOP)/$(LD_FILE) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections
|
||||
ifneq ($(SKIP_NANOLIB), 1)
|
||||
LDFLAGS += -specs=nosys.specs -specs=nano.specs
|
||||
endif
|
||||
|
||||
ASFLAGS += $(CFLAGS)
|
||||
|
||||
# Assembly files can be name with upper case .S, convert it to .s
|
||||
@@ -188,6 +195,8 @@ else
|
||||
$(RM) -rf $(BUILD)
|
||||
endif
|
||||
|
||||
endif # GNU Make
|
||||
|
||||
# Print out the value of a make variable.
|
||||
# https://stackoverflow.com/questions/16467718/how-to-print-out-a-variable-in-makefile
|
||||
print-%:
|
||||
@@ -221,7 +230,6 @@ flash-pyocd: $(BUILD)/$(PROJECT).hex
|
||||
pyocd flash -t $(PYOCD_TARGET) $<
|
||||
pyocd reset -t $(PYOCD_TARGET)
|
||||
|
||||
endif # GNU Make
|
||||
|
||||
#-------------- Artifacts --------------
|
||||
|
||||
|
Reference in New Issue
Block a user