Remove IAR toolchain support from make build system#3563
Conversation
Size Difference ReportBecause TinyUSB code size varies by port and configuration, the metrics below represent the averaged totals across all example builds. Note: If there is no change, only one value is shown. Changes >1% in sizeNo entries. Changes <1% in sizeNo entries. No changes
|
|
| target | .text | .rodata | .data | .bss | total | % diff |
|---|---|---|---|---|---|---|
| frdm_rw612/msc_file_explorer | 40,480 → 40,472 (-8) | — | — | — | 40,496 → 40,488 (-8) | -0.0% |
| raspberry_pi_pico/msc_file_explorer | 44,056 → 44,048 (-8) | — | — | — | 47,960 → 47,952 (-8) | -0.0% |
| hpm6750evk2/msc_file_explorer | 48,576 → 48,568 (-8) | — | — | — | 48,728 → 48,720 (-8) | -0.0% |
| lpcxpresso1769/msc_file_explorer | 32,508 → 32,504 (-4) | — | — | — | 32,888 → 32,884 (-4) | -0.0% |
| frdm_kl25z/msc_file_explorer | 34,844 → 34,840 (-4) | — | — | — | 34,844 → 34,840 (-4) | -0.0% |
| lpcxpresso18s37/msc_file_explorer | 34,740 → 34,736 (-4) | — | — | — | 35,186 → 35,182 (-4) | -0.0% |
| portenta_c33/msc_file_explorer | 35,433 → 35,429 (-4) | — | — | — | 35,433 → 35,429 (-4) | -0.0% |
| metro_m7_1011/msc_file_explorer | 37,368 → 37,364 (-4) | — | — | — | 37,376 → 37,372 (-4) | -0.0% |
| double_m33_express/msc_file_explorer | 37,520 → 37,516 (-4) | — | — | — | 37,528 → 37,524 (-4) | -0.0% |
| stm32c071nucleo/msc_file_explorer | 35,204 → 35,200 (-4) | — | — | — | 38,756 → 38,752 (-4) | -0.0% |
44c0add to
c53dc85
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1293317765
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| #include "board.h" | ||
|
|
||
| #ifdef UART_ID |
There was a problem hiding this comment.
Guard STM32F7 UART code with the board macro
The UART implementation is now compiled only when UART_ID is defined, but STM32F7 board headers still define UART_DEV (for example hw/bsp/stm32f7/boards/stm32f746disco/board.h). That means board_init() skips UART setup and board_uart_write()/board_uart_read() fall back to the no-UART stubs for every STM32F7 board, so stdio/log output silently stops working on those targets. Please keep compatibility with UART_DEV (or update all STM32F7 board headers in the same change).
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
Removes IAR toolchain support from the make build system by consolidating toolchain-specific variables into generic ones, deleting IAR make toolchain files, and updating family/board makefiles accordingly. Also includes a small MSC file explorer fix and STM32F7 UART formatting/logic changes.
Changes:
- Remove IAR make toolchain integration (deleted
arm_iar.mk/iar_rules.mk, removed IAR selection paths in make CPU/toolchain logic). - Update BSP family/board makefiles to use generic
CFLAGS/LDFLAGS/SRC_S/LD_FILEvariables (dropping*_GCCand*_IARvariants). - Fix MSC
GET_SECTOR_COUNTtruncation cast and refactor STM32F7 UART handling.
Reviewed changes
Copilot reviewed 143 out of 143 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| hw/bsp/tm4c/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/tm4c/boards/ek_tm4c1294xl/board.mk | Replace LD_FILE_GCC/LD_FILE_IAR with unified LD_FILE. |
| hw/bsp/stm32wba/family.mk | Consolidate GCC/IAR flags and startup/linker selection into generic variables. |
| hw/bsp/stm32wb/family.mk | Consolidate GCC/IAR flags and startup/linker selection into generic variables. |
| hw/bsp/stm32u5/family.mk | Consolidate GCC/IAR flags and startup selection; remove IAR linker var. |
| hw/bsp/stm32u0/family.mk | Consolidate GCC/IAR flags and startup selection; remove IAR linker var. |
| hw/bsp/stm32n6/family.mk | Consolidate GCC/IAR flags and startup/linker selection into generic variables. |
| hw/bsp/stm32n6/boards/stm32n657nucleo/board.mk | Replace LD_FILE_GCC with unified LD_FILE. |
| hw/bsp/stm32n6/boards/stm32n6570dk/board.mk | Replace LD_FILE_GCC with unified LD_FILE. |
| hw/bsp/stm32l4/family.mk | Consolidate GCC-only flags into generic CFLAGS/LDFLAGS. |
| hw/bsp/stm32l4/boards/stm32l4r5nucleo/board.mk | Replace GCC/IAR startup+linker vars with unified SRC_S/LD_FILE. |
| hw/bsp/stm32l4/boards/stm32l4p5nucleo/board.mk | Replace GCC/IAR startup+linker vars with unified SRC_S/LD_FILE. |
| hw/bsp/stm32l4/boards/stm32l496nucleo/board.mk | Replace GCC/IAR startup+linker vars with unified SRC_S/LD_FILE. |
| hw/bsp/stm32l4/boards/stm32l476disco/board.mk | Replace GCC/IAR startup+linker vars with unified SRC_S/LD_FILE. |
| hw/bsp/stm32l4/boards/stm32l412nucleo/board.mk | Replace GCC/IAR startup+linker vars with unified SRC_S/LD_FILE. |
| hw/bsp/stm32l0/family.mk | Consolidate GCC/IAR startup selection into generic SRC_S. |
| hw/bsp/stm32h7rs/family.mk | Consolidate GCC/IAR flags and startup/linker selection into generic variables. |
| hw/bsp/stm32h7/family.mk | Consolidate GCC/IAR flags and startup selection into generic variables. |
| hw/bsp/stm32h7/boards/waveshare_openh743i/board.mk | Replace LD_FILE_GCC with unified LD_FILE. |
| hw/bsp/stm32h7/boards/stm32h750bdk/board.mk | Replace LD_FILE_GCC with unified LD_FILE. |
| hw/bsp/stm32h7/boards/stm32h750_weact/board.mk | Replace LD_FILE_GCC with unified LD_FILE. |
| hw/bsp/stm32h7/boards/stm32h747disco/board.mk | Replace GCC/IAR linker vars with unified LD_FILE. |
| hw/bsp/stm32h7/boards/stm32h745disco/board.mk | Replace GCC/IAR linker vars with unified LD_FILE. |
| hw/bsp/stm32h7/boards/stm32h743nucleo/board.mk | Replace LD_FILE_GCC with unified LD_FILE. |
| hw/bsp/stm32h7/boards/stm32h743eval/board.mk | Replace LD_FILE_GCC with unified LD_FILE. |
| hw/bsp/stm32h7/boards/stm32h723nucleo/board.mk | Replace LD_FILE_GCC with unified LD_FILE. |
| hw/bsp/stm32h7/boards/daisyseed/board.mk | Replace LD_FILE_GCC with unified LD_FILE. |
| hw/bsp/stm32h5/family.mk | Consolidate GCC/IAR flags and startup/linker selection into generic variables. |
| hw/bsp/stm32g4/family.mk | Consolidate GCC/IAR flags and startup selection into generic variables. |
| hw/bsp/stm32g4/boards/stm32g491nucleo/board.mk | Replace LD_FILE_GCC with unified LD_FILE. |
| hw/bsp/stm32g4/boards/stm32g474nucleo/board.mk | Replace LD_FILE_GCC with unified LD_FILE. |
| hw/bsp/stm32g4/boards/b_g474e_dpow1/board.mk | Replace LD_FILE_GCC with unified LD_FILE. |
| hw/bsp/stm32g0/family.mk | Consolidate GCC-only flags into generic CFLAGS/LDFLAGS. |
| hw/bsp/stm32g0/boards/stm32g0b1nucleo/board.mk | Replace GCC/IAR startup+linker vars with unified SRC_S/LD_FILE. |
| hw/bsp/stm32f7/family.mk | Consolidate GCC/IAR flags and startup selection into generic variables. |
| hw/bsp/stm32f7/family.c | Refactor UART handling and code formatting; add FIFO-based RX path. |
| hw/bsp/stm32f7/boards/stm32f769disco/board.mk | Replace LD_FILE_GCC with unified LD_FILE. |
| hw/bsp/stm32f7/boards/stm32f767nucleo/board.mk | Replace LD_FILE_GCC with unified LD_FILE. |
| hw/bsp/stm32f7/boards/stm32f746nucleo/board.mk | Replace LD_FILE_GCC with unified LD_FILE. |
| hw/bsp/stm32f7/boards/stm32f746disco/board.mk | Replace LD_FILE_GCC with unified LD_FILE. |
| hw/bsp/stm32f7/boards/stm32f723disco/board.mk | Replace LD_FILE_GCC with unified LD_FILE. |
| hw/bsp/stm32f7/boards/stlinkv3mini/board.mk | Replace LD_FILE_GCC with unified LD_FILE. |
| hw/bsp/stm32f4/family.mk | Consolidate GCC-only flags into generic CFLAGS/LDFLAGS. |
| hw/bsp/stm32f4/boards/stm32f439nucleo/board.mk | Replace GCC/IAR startup+linker vars with unified SRC_S/LD_FILE. |
| hw/bsp/stm32f4/boards/stm32f412nucleo/board.mk | Replace GCC/IAR startup+linker vars with unified SRC_S/LD_FILE. |
| hw/bsp/stm32f4/boards/stm32f412disco/board.mk | Replace GCC/IAR startup+linker vars with unified SRC_S/LD_FILE. |
| hw/bsp/stm32f4/boards/stm32f411disco/board.mk | Replace GCC/IAR startup+linker vars with unified SRC_S/LD_FILE. |
| hw/bsp/stm32f4/boards/stm32f411blackpill/board.mk | Replace GCC/IAR startup+linker vars with unified SRC_S/LD_FILE. |
| hw/bsp/stm32f4/boards/stm32f407disco/board.mk | Replace GCC/IAR startup+linker vars with unified SRC_S/LD_FILE. |
| hw/bsp/stm32f4/boards/stm32f407blackvet/board.mk | Replace GCC/IAR startup+linker vars with unified SRC_S/LD_FILE. |
| hw/bsp/stm32f4/boards/stm32f401blackpill/board.mk | Replace GCC/IAR startup+linker vars with unified SRC_S/LD_FILE. |
| hw/bsp/stm32f4/boards/pyboardv11/board.mk | Replace GCC/IAR startup+linker vars with unified SRC_S/LD_FILE. |
| hw/bsp/stm32f4/boards/feather_stm32f405/board.mk | Replace GCC/IAR startup+linker vars with unified SRC_S/LD_FILE. |
| hw/bsp/stm32f3/family.mk | Consolidate GCC/IAR startup selection into generic SRC_S. |
| hw/bsp/stm32f2/family.mk | Consolidate GCC/IAR startup selection into generic SRC_S. |
| hw/bsp/stm32f1/family.mk | Consolidate GCC/IAR startup selection into generic SRC_S. |
| hw/bsp/stm32f1/boards/stm32f103ze_iar/board.mk | Replace GCC/IAR linker vars with unified LD_FILE. |
| hw/bsp/stm32f1/boards/stm32f103_mini_2/board.mk | Replace GCC/IAR linker vars with unified LD_FILE. |
| hw/bsp/stm32f1/boards/stm32f103_bluepill/board.mk | Replace GCC/IAR linker vars with unified LD_FILE. |
| hw/bsp/stm32f0/family.mk | Consolidate GCC/IAR flags and startup selection into generic variables. |
| hw/bsp/stm32f0/boards/stm32f072eval/board.mk | Replace LD_FILE_GCC with unified LD_FILE. |
| hw/bsp/stm32f0/boards/stm32f072disco/board.mk | Replace LD_FILE_GCC with unified LD_FILE. |
| hw/bsp/stm32f0/boards/stm32f070rbnucleo/board.mk | Replace LD_FILE_GCC with unified LD_FILE. |
| hw/bsp/stm32c0/family.mk | Consolidate GCC-only flags into generic CFLAGS/LDFLAGS. |
| hw/bsp/stm32c0/boards/stm32c071nucleo/board.mk | Replace GCC/IAR startup+linker vars with unified SRC_S/LD_FILE. |
| hw/bsp/samg/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/same7x/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/samd5x_e5x/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/samd2x_l2x/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/samd11/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/rx/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/rw61x/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/ra/family.mk | Consolidate GCC-only flags into generic CFLAGS/LDFLAGS. |
| hw/bsp/nuc505/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/nuc126/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/nuc121_125/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/nuc100_120/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/nrf/family.mk | Consolidate GCC-only flags into generic CFLAGS/LDFLAGS. |
| hw/bsp/msp432e4/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/mm32/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/mcx/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/maxim/family.mk | Consolidate GCC-only flags/startup/linker selection into generic variables. |
| hw/bsp/lpc55/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/lpc54/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/lpc51/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/lpc43/family.mk | Consolidate GCC-only flags into generic CFLAGS/LDFLAGS. |
| hw/bsp/lpc40/family.mk | Consolidate GCC-only flags into generic CFLAGS/LDFLAGS. |
| hw/bsp/lpc18/family.mk | Consolidate GCC-only flags into generic CFLAGS/LDFLAGS. |
| hw/bsp/lpc17/family.mk | Consolidate GCC-only flags into generic CFLAGS/LDFLAGS. |
| hw/bsp/lpc15/family.mk | Consolidate GCC-only flags into generic CFLAGS/LDFLAGS. |
| hw/bsp/lpc13/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/lpc11/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/kinetis_kl/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/kinetis_k32l/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/kinetis_k32l/boards/frdm_k32l2a4s/board.mk | Consolidate GCC-only CFLAGS into generic CFLAGS. |
| hw/bsp/kinetis_k/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/imxrt/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/hpmicro/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/fomu/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/family_support.mk | Remove IAR toolchain detection; force FreeRTOS portable path to GCC; consolidate *_GCC suppressions into generic flags. |
| hw/bsp/efm32/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/da1469x/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/cxd56/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/ch32v30x/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/ch32v20x/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/ch32v10x/family.mk | Switch GCC-only linker flags to generic LDFLAGS. |
| hw/bsp/broadcom_64bit/family.mk | Consolidate GCC-only CFLAGS into generic CFLAGS. |
| hw/bsp/broadcom_32bit/family.mk | Consolidate GCC-only CFLAGS into generic CFLAGS. |
| hw/bsp/at32f45x/family.mk | Consolidate GCC/IAR startup/linker vars into generic SRC_S/LD_FILE and flags into generic vars. |
| hw/bsp/at32f435_437/family.mk | Consolidate GCC/IAR startup/linker vars into generic SRC_S/LD_FILE and flags into generic vars. |
| hw/bsp/at32f425/family.mk | Consolidate GCC/IAR startup/linker vars into generic SRC_S/LD_FILE and flags into generic vars. |
| hw/bsp/at32f423/family.mk | Consolidate GCC/IAR startup/linker vars into generic SRC_S/LD_FILE and flags into generic vars. |
| hw/bsp/at32f415/family.mk | Consolidate GCC/IAR startup/linker vars into generic SRC_S/LD_FILE and flags into generic vars. |
| hw/bsp/at32f413/family.mk | Consolidate GCC/IAR startup/linker vars into generic SRC_S/LD_FILE and flags into generic vars. |
| hw/bsp/at32f403a_407/family.mk | Consolidate GCC/IAR startup/linker vars into generic SRC_S/LD_FILE and flags into generic vars. |
| hw/bsp/at32f402_405/family.mk | Consolidate GCC/IAR startup/linker vars into generic SRC_S/LD_FILE and flags into generic vars. |
| examples/host/msc_file_explorer/src/msc_app.c | Fix GET_SECTOR_COUNT truncation by casting to DWORD. |
| examples/host/msc_file_explorer/Makefile | Move GCC-only warning suppression to generic CFLAGS. |
| examples/dual/host_info_to_device_cdc/Makefile | Move GCC-only warning suppression to generic CFLAGS. |
| examples/dual/host_hid_to_device_cdc/Makefile | Move GCC-only warning suppression to generic CFLAGS. |
| examples/device/net_lwip_webserver/Makefile | Move GCC-only warning suppression to generic CFLAGS. |
| examples/build_system/make/toolchain/iar_rules.mk | Remove IAR-specific build rules (file deleted). |
| examples/build_system/make/toolchain/gcc_rules.mk | Remove legacy *_GCC variable wiring; simplify link flag assembly and LD script selection. |
| examples/build_system/make/toolchain/arm_iar.mk | Remove IAR toolchain definition (file deleted). |
| examples/build_system/make/cpu/rv32imac-ilp32.mk | Remove IAR toolchain branch. |
| examples/build_system/make/cpu/rv32i-ilp32.mk | Remove IAR toolchain branch. |
| examples/build_system/make/cpu/msp430.mk | Remove IAR toolchain branch. |
| examples/build_system/make/cpu/cortex-m85.mk | Remove IAR-specific CPU/FPU flags. |
| examples/build_system/make/cpu/cortex-m7.mk | Remove IAR-specific CPU/FPU flags. |
| examples/build_system/make/cpu/cortex-m7-fpsp.mk | Remove IAR-specific CPU/FPU flags. |
| examples/build_system/make/cpu/cortex-m55.mk | Remove IAR-specific CPU/FPU flags. |
| examples/build_system/make/cpu/cortex-m4.mk | Remove IAR-specific CPU/FPU flags. |
| examples/build_system/make/cpu/cortex-m4-nofpu.mk | Remove IAR-specific CPU/FPU flags. |
| examples/build_system/make/cpu/cortex-m33.mk | Remove IAR-specific CPU/FPU flags. |
| examples/build_system/make/cpu/cortex-m33-nodsp-nofp.mk | Remove IAR-specific CPU flags. |
| examples/build_system/make/cpu/cortex-m3.mk | Remove IAR-specific CPU flags. |
| examples/build_system/make/cpu/cortex-m23.mk | Remove IAR-specific CPU flags. |
| examples/build_system/make/cpu/cortex-m0plus.mk | Remove IAR-specific CPU flags. |
| examples/build_system/make/cpu/cortex-m0.mk | Remove IAR-specific CPU flags. |
| examples/build_system/make/cpu/cortex-a72.mk | Remove IAR-specific CPU flags. |
| examples/build_system/make/cpu/cortex-a53.mk | Remove IAR-specific CPU flags. |
| examples/build_system/make/cpu/arm926ej-s.mk | Remove IAR-specific commented flags. |
| examples/build_system/make/cpu/arm1176jzf-s.mk | Remove IAR-specific commented flags. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| #ifdef UART_ID | ||
| #if UART_ID == 1 | ||
| #define USARTn USART1 | ||
| #define USARTn_IRQn USART1_IRQn | ||
| #define USARTn_IRQHandler USART1_IRQHandler | ||
| #define UARTn_CLK_ENABLE __HAL_RCC_USART1_CLK_ENABLE | ||
| #elif UART_ID == 2 | ||
| #define USARTn USART2 | ||
| #define USARTn_IRQn USART2_IRQn | ||
| #define USARTn_IRQHandler USART2_IRQHandler | ||
| #define UARTn_CLK_ENABLE __HAL_RCC_USART2_CLK_ENABLE | ||
| #elif UART_ID == 3 | ||
| #define USARTn USART3 | ||
| #define USARTn_IRQn USART3_IRQn | ||
| #define USARTn_IRQHandler USART3_IRQHandler | ||
| #define UARTn_CLK_ENABLE __HAL_RCC_USART3_CLK_ENABLE | ||
| #elif UART_ID == 6 | ||
| #define USARTn USART6 | ||
| #define USARTn_IRQn USART6_IRQn | ||
| #define USARTn_IRQHandler USART6_IRQHandler | ||
| #define UARTn_CLK_ENABLE __HAL_RCC_USART6_CLK_ENABLE | ||
| #endif | ||
| #endif |
There was a problem hiding this comment.
family.c switched UART enable path from UART_DEV (as provided by STM32F7 board headers) to a new UART_ID macro, but none of the STM32F7 board headers define UART_ID (they define UART_DEV/UART_CLK_EN). As a result, UART initialization and the IRQ handler are compiled out and UART logging/IO silently stops working on existing STM32F7 boards. Consider reverting to UART_DEV (or supporting both macros), or updating all STM32F7 board headers/build flags to define UART_ID consistently.
| int board_uart_read(uint8_t *buf, int len) { | ||
| #ifdef UART_DEV | ||
| int count = 0; | ||
| // clear overrun error if any | ||
| if (__HAL_UART_GET_FLAG(&UartHandle, UART_FLAG_ORE)) { | ||
| __HAL_UART_CLEAR_FLAG(&UartHandle, UART_CLEAR_OREF); | ||
| } | ||
| for (int i = 0; i < len; i++) { | ||
| if (__HAL_UART_GET_FLAG(&UartHandle, UART_FLAG_RXNE)) { | ||
| buf[i] = (uint8_t) UartHandle.Instance->RDR; | ||
| #ifdef UART_ID | ||
| return (int)tu_fifo_read_n(&uart_rx_ff, buf, (uint16_t)len); | ||
| #else | ||
| (void)buf; | ||
| (void)len; | ||
| return 0; | ||
| #endif | ||
| } | ||
|
|
||
| int board_uart_write(const void *buf, int len) { | ||
| #ifdef UART_ID | ||
| const uint8_t *p = (const uint8_t *)buf; | ||
| int count = 0; | ||
| while (count < len) { | ||
| if (__HAL_UART_GET_FLAG(&UartHandle, UART_FLAG_TXE)) { | ||
| UartHandle.Instance->TDR = p[count]; | ||
| count++; | ||
| } else { | ||
| break; | ||
| } | ||
| } | ||
| return count; | ||
| #else | ||
| (void) buf; (void) len; | ||
| (void)buf; | ||
| (void)len; | ||
| return 0; | ||
| #endif |
There was a problem hiding this comment.
With UART_ID undefined for STM32F7 boards, board_uart_read()/board_uart_write() now always return 0 even when the board provides UART_DEV. This is a behavioral regression compared to the previous HAL_UART_Transmit()-based implementation and will break UART-based logging. Align the UART feature-guard with the board contract (e.g., #ifdef UART_DEV) or ensure UART_ID is provided for all boards that expect UART.
| CFLAGS += \ | ||
| -flto \ | ||
|
|
||
| # mcu driver cause following warnings | ||
| CFLAGS_GCC += -Wno-error=cast-align | ||
| CFLAGS += -Wno-error=cast-align | ||
|
|
||
| LDFLAGS_GCC += \ | ||
| LDFLAGS += \ | ||
| -nostdlib -nostartfiles \ | ||
| --specs=nosys.specs --specs=nano.specs |
There was a problem hiding this comment.
--specs=nosys.specs/--specs=nano.specs are GCC driver options; moving them into unconditional LDFLAGS means they will also be passed when building with the make arm_clang toolchain (examples/build_system/make/toolchain/arm_clang.mk), where clang typically rejects --specs. To keep clang builds working, gate these flags behind ifeq ($(TOOLCHAIN),gcc) (or move them into the GCC toolchain makefile) and provide a clang-compatible alternative if needed.
| CFLAGS += -MD | ||
|
|
There was a problem hiding this comment.
-MD is already added in examples/build_system/make/toolchain/gcc_common.mk (CFLAGS baseline). Adding it again here is redundant and makes it harder to reason about the final flag set. Consider removing this extra CFLAGS += -MD line and rely on gcc_common.mk for dependency generation.
| CFLAGS += -MD |
IAR is only supported with CMake. Remove all IAR-specific references from the Make build system including toolchain files, SRC_S_IAR, LD_FILE_IAR variables, and IAR toolchain detection. Also fix GET_SECTOR_COUNT truncation in msc_file_explorer and broken formatting in stm32f7 board_uart_write. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1293317 to
4c7a9fe
Compare
Summary
arm_iar.mk,iar_rules.mk) from make build systemSRC_S_IARandLD_FILE_IARvariables from family.mk and board.mk filesiccarm) fromfamily_support.mkGET_SECTOR_COUNTtruncation bug inmsc_file_explorer(WORD→DWORD cast)stm32f7/family.cboard_uart_writeIAR remains supported via CMake only.
Test plan
stm32f407discoandstm32f072disco🤖 Generated with Claude Code