diff --git a/.circleci/config2.yml b/.circleci/config2.yml index 6655fe45de..e811ef3ede 100644 --- a/.circleci/config2.yml +++ b/.circleci/config2.yml @@ -12,7 +12,7 @@ commands: command: | TOOLCHAIN_JSON='{ "aarch64-gcc": "https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz", - "arm-clang": "https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-17.0.1/LLVMEmbeddedToolchainForArm-17.0.1-Linux-x86_64.tar.xz", + "arm-clang": "https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-19.1.1/LLVM-ET-Arm-19.1.1-Linux-x86_64.tar.xz", "arm-gcc": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v13.2.1-1.1/xpack-arm-none-eabi-gcc-13.2.1-1.1-linux-x64.tar.gz", "msp430-gcc": "http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/9_2_0_0/export/msp430-gcc-9.2.0.50_linux64.tar.bz2", "riscv-gcc": "https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v13.2.0-2/xpack-riscv-none-elf-gcc-13.2.0-2-linux-x64.tar.gz", diff --git a/.github/actions/setup_toolchain/action.yml b/.github/actions/setup_toolchain/action.yml index 40dbd87b26..8406a812d7 100644 --- a/.github/actions/setup_toolchain/action.yml +++ b/.github/actions/setup_toolchain/action.yml @@ -38,7 +38,7 @@ runs: run: | TOOLCHAIN_JSON='{ "aarch64-gcc": "https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz", - "arm-clang": "https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-17.0.1/LLVMEmbeddedToolchainForArm-17.0.1-Linux-x86_64.tar.xz", + "arm-clang": "https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-19.1.1/LLVM-ET-Arm-19.1.1-Linux-x86_64.tar.xz", "msp430-gcc": "http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/9_2_0_0/export/msp430-gcc-9.2.0.50_linux64.tar.bz2", "riscv-gcc": "https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v13.2.0-2/xpack-riscv-none-elf-gcc-13.2.0-2-linux-x64.tar.gz", "rx-gcc": "http://gcc-renesas.com/downloads/get.php?f=rx/8.3.0.202004-gnurx/gcc-8.3.0.202004-GNURX-ELF.run" diff --git a/.idea/cmake.xml b/.idea/cmake.xml index 1210c49e74..aa15374b91 100644 --- a/.idea/cmake.xml +++ b/.idea/cmake.xml @@ -61,7 +61,7 @@ - + @@ -100,7 +100,7 @@ - + @@ -108,7 +108,7 @@ - + diff --git a/examples/build_system/cmake/toolchain/aarch64_gcc.cmake b/examples/build_system/cmake/toolchain/aarch64_gcc.cmake index 2d30a0b71d..ac1e482eb8 100644 --- a/examples/build_system/cmake/toolchain/aarch64_gcc.cmake +++ b/examples/build_system/cmake/toolchain/aarch64_gcc.cmake @@ -7,9 +7,9 @@ if (NOT DEFINED CMAKE_CXX_COMPILER) endif () set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER}) -set(CMAKE_SIZE "aarch64-none-elf-size" CACHE FILEPATH "") -set(CMAKE_OBJCOPY "aarch64-none-elf-objcopy" CACHE FILEPATH "") -set(CMAKE_OBJDUMP "aarch64-none-elf-objdump" CACHE FILEPATH "") +find_program(CMAKE_SIZE aarch64-none-elf-size) +find_program(CMAKE_OBJCOPY aarch64-none-elf-objcopy) +find_program(CMAKE_OBJDUMP aarch64-none-elf-objdump) include(${CMAKE_CURRENT_LIST_DIR}/common.cmake) diff --git a/examples/build_system/cmake/toolchain/arm_clang.cmake b/examples/build_system/cmake/toolchain/arm_clang.cmake index 754d672fd0..fe3c2b4539 100644 --- a/examples/build_system/cmake/toolchain/arm_clang.cmake +++ b/examples/build_system/cmake/toolchain/arm_clang.cmake @@ -7,9 +7,9 @@ if (NOT DEFINED CMAKE_CXX_COMPILER) endif () set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER}) -set(CMAKE_SIZE "llvm-size" CACHE FILEPATH "") -set(CMAKE_OBJCOPY "llvm-objcopy" CACHE FILEPATH "") -set(CMAKE_OBJDUMP "llvm-objdump" CACHE FILEPATH "") +find_program(CMAKE_SIZE llvm-size) +find_program(CMAKE_OBJCOPY llvm-objcopy) +find_program(CMAKE_OBJDUMP llvm-objdump) include(${CMAKE_CURRENT_LIST_DIR}/common.cmake) diff --git a/examples/build_system/cmake/toolchain/arm_gcc.cmake b/examples/build_system/cmake/toolchain/arm_gcc.cmake index d3d73c629c..0b0949dd89 100644 --- a/examples/build_system/cmake/toolchain/arm_gcc.cmake +++ b/examples/build_system/cmake/toolchain/arm_gcc.cmake @@ -7,9 +7,9 @@ if (NOT DEFINED CMAKE_CXX_COMPILER) endif () set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER}) -set(CMAKE_SIZE "arm-none-eabi-size" CACHE FILEPATH "") -set(CMAKE_OBJCOPY "arm-none-eabi-objcopy" CACHE FILEPATH "") -set(CMAKE_OBJDUMP "arm-none-eabi-objdump" CACHE FILEPATH "") +find_program(CMAKE_SIZE arm-none-eabi-size) +find_program(CMAKE_OBJCOPY arm-none-eabi-objcopy) +find_program(CMAKE_OBJDUMP arm-none-eabi-objdump) include(${CMAKE_CURRENT_LIST_DIR}/common.cmake) diff --git a/examples/build_system/cmake/toolchain/arm_iar.cmake b/examples/build_system/cmake/toolchain/arm_iar.cmake index 6d2219ca86..083815715d 100644 --- a/examples/build_system/cmake/toolchain/arm_iar.cmake +++ b/examples/build_system/cmake/toolchain/arm_iar.cmake @@ -10,8 +10,8 @@ if (NOT DEFINED CMAKE_ASM_COMPILER) set(CMAKE_ASM_COMPILER "iasmarm") endif() -set(CMAKE_SIZE "size" CACHE FILEPATH "") -set(CMAKE_OBJCOPY "ielftool" CACHE FILEPATH "") -set(CMAKE_OBJDUMP "iefdumparm" CACHE FILEPATH "") +find_program(CMAKE_SIZE size) +find_program(CMAKE_OBJCOPY ielftool) +find_program(CMAKE_OBJDUMP iefdumparm) include(${CMAKE_CURRENT_LIST_DIR}/common.cmake) diff --git a/examples/build_system/cmake/toolchain/msp430_gcc.cmake b/examples/build_system/cmake/toolchain/msp430_gcc.cmake index 73368adba9..7995189317 100644 --- a/examples/build_system/cmake/toolchain/msp430_gcc.cmake +++ b/examples/build_system/cmake/toolchain/msp430_gcc.cmake @@ -8,8 +8,8 @@ endif () set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER}) -set(CMAKE_SIZE "msp430-elf-size" CACHE FILEPATH "") -set(CMAKE_OBJCOPY "msp430-elf-objcopy" CACHE FILEPATH "") -set(CMAKE_OBJDUMP "msp430-elf-objdump" CACHE FILEPATH "") +find_program(CMAKE_SIZE msp430-elf-size) +find_program(CMAKE_OBJCOPY msp430-elf-objcopy) +find_program(CMAKE_OBJDUMP msp430-elf-objdump) include(${CMAKE_CURRENT_LIST_DIR}/common.cmake) diff --git a/examples/build_system/cmake/toolchain/riscv_gcc.cmake b/examples/build_system/cmake/toolchain/riscv_gcc.cmake index d788df0232..60a24528bc 100644 --- a/examples/build_system/cmake/toolchain/riscv_gcc.cmake +++ b/examples/build_system/cmake/toolchain/riscv_gcc.cmake @@ -16,9 +16,9 @@ if (NOT DEFINED CMAKE_CXX_COMPILER) endif () set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER}) -set(CMAKE_SIZE ${CROSS_COMPILE}size CACHE FILEPATH "") -set(CMAKE_OBJCOPY ${CROSS_COMPILE}objcopy CACHE FILEPATH "") -set(CMAKE_OBJDUMP ${CROSS_COMPILE}objdump CACHE FILEPATH "") +find_program(CMAKE_SIZE ${CROSS_COMPILE}size) +find_program(CMAKE_OBJCOPY ${CROSS_COMPILE}objcopy) +find_program(CMAKE_OBJDUMP ${CROSS_COMPILE}objdump) include(${CMAKE_CURRENT_LIST_DIR}/common.cmake) diff --git a/hw/bsp/family_support.cmake b/hw/bsp/family_support.cmake index 57fa63261e..3f2872a30e 100644 --- a/hw/bsp/family_support.cmake +++ b/hw/bsp/family_support.cmake @@ -553,6 +553,7 @@ function(family_flash_teensy TARGET) add_custom_target(${TARGET}-teensy DEPENDS ${TARGET} + COMMAND ${CMAKE_OBJCOPY} -Oihex $ $/${TARGET}.hex COMMAND ${TEENSY_CLI} --mcu=${TEENSY_MCU} -w -s $/${TARGET}.hex ) endfunction() diff --git a/hw/bsp/kinetis_k/FreeRTOSConfig/FreeRTOSConfig.h b/hw/bsp/kinetis_k/FreeRTOSConfig/FreeRTOSConfig.h index ed46508a46..76004241a2 100644 --- a/hw/bsp/kinetis_k/FreeRTOSConfig/FreeRTOSConfig.h +++ b/hw/bsp/kinetis_k/FreeRTOSConfig/FreeRTOSConfig.h @@ -129,8 +129,6 @@ }\ }\ } while(0) -#else - #define configASSERT( x ) #endif /* FreeRTOS hooks to NVIC vectors */ diff --git a/hw/bsp/kinetis_k/boards/teensy_35/board.cmake b/hw/bsp/kinetis_k/boards/teensy_35/board.cmake index bd253d996f..ae4409e120 100644 --- a/hw/bsp/kinetis_k/boards/teensy_35/board.cmake +++ b/hw/bsp/kinetis_k/boards/teensy_35/board.cmake @@ -2,7 +2,6 @@ set(MCU_VARIANT MK64F12) set(JLINK_DEVICE MK64FX512xxx12) set(TEENSY_MCU TEENSY35) -set(PYOCD_TARGET k64f) set(LD_FILE_GNU ${SDK_DIR}/devices/${MCU_VARIANT}/gcc/MK64FX512xxx12_flash.ld) diff --git a/hw/bsp/kinetis_k/family.cmake b/hw/bsp/kinetis_k/family.cmake index 771754ebd1..c302686295 100644 --- a/hw/bsp/kinetis_k/family.cmake +++ b/hw/bsp/kinetis_k/family.cmake @@ -111,7 +111,6 @@ function(family_configure_example TARGET RTOS) family_flash_jlink(${TARGET}) if (DEFINED TEENSY_MCU) - family_add_bin_hex(${TARGET}) family_flash_teensy(${TARGET}) endif () endfunction() diff --git a/src/class/midi/midi_device.c b/src/class/midi/midi_device.c index 5be4cb9936..c545f82878 100644 --- a/src/class/midi/midi_device.c +++ b/src/class/midi/midi_device.c @@ -97,7 +97,7 @@ static void _prep_out_transaction(uint8_t idx) { // TODO Actually we can still carry out the transfer, keeping count of received bytes // and slowly move it to the FIFO when read(). // This pre-check reduces endpoint claiming - TU_VERIFY(available >= sizeof(_midid_epbuf[idx].epout), ); + TU_VERIFY(available >= CFG_TUD_MIDI_EP_BUFSIZE, ); // claim endpoint TU_VERIFY(usbd_edpt_claim(rhport, p_midi->ep_out), );