- Add chip macro for driver
- Modify 'IDLE_THREAD_STACK_SIZE' to 512
- Modify 'HWTIMER' to 'CLOCK_TIMER'
- Use 'clang-format' format driver and BSP code
- Fix SPI clock division configuration
The RT_USING_CPU_USAGE_TRACER print block was duplicated identically in
both the ARCH_CPU_STACK_GROWS_UPWARD and the normal branch of
list_thread(). Both branches only differ in the stack usage line (which
has no trailing newline), so move the single shared block after the
#endif of the stack-growth conditional. No functional change.
* [bsp][imxrt1180-nxp-evk]add TIMER support
* [bsp][imxrt1180-nxp-evk]update TIMER support
* [bsp][imxrt1180-nxp-evk] move fsl_gpt.c inclusion to SDK package SConscript
* [bsp][imxrt1180-nxp-evk] restore main.c to original Hello_World version
* [bsp][imxrt1180-nxp-evk] remove libraries/drivers/drv_timer.h
* [bsp][imxrt1180-nxp-evk]update TIMER support
rt_hw_eth_init() clears ENET descriptor tables using element size times count, but the RX/TX data buffers used sizeof(size), which only covers the width of the size field.
Use the configured buffer count and size so the whole RX/TX buffer areas are initialized before handing them to the ENET descriptor configuration.
Make the Cppcheck intent explicit for the HPM placement macros and the LPI_CSR register read so the touched file passes static analysis.
Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
rt_pci_ep_set_msi() checked the set_msix callback before calling set_msi. That rejects endpoint controllers that implement MSI without MSI-X, and can call through a NULL set_msi pointer when only MSI-X is provided.
The same helper converts a requested MSI vector count into the log2 field passed to the controller. Stop after the first value large enough for the request so smaller requests are not widened by later loop iterations.
Generated-by: OpenAI Codex
Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
rt_pic_linear_irq() stores irq_nr as a count and assigns pic->pirqs to the first entry in that range. rt_pic_find_pirq() therefore must treat the upper bound as exclusive.
The inclusive check could return pic->pirqs[irq_nr] when irq equals irq_start + irq_nr, which is one entry past the allocated range.
Generated-by: OpenAI Codex
Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
RT_CAN_CMD_SET_BITTIMING receives an array of struct rt_can_bit_timing entries. The Rockchip CAN-FD driver used sizeof(&timing->items[n]) when copying those entries, so only pointer-sized bytes were copied into the device configuration.
Use the element size so both arbitration and data phase timing structures are copied completely.
Generated-by: OpenAI Codex
Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
Valid slew_rates indices are 0 through RT_ARRAY_SIZE(slew_rates) - 1.
The current check rejects only values greater than the table size,
allowing slew_idx == RT_ARRAY_SIZE(slew_rates) to index one element
past the table.
Generated-by: OpenAI Codex
Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
Reset the whole FQSpi_CmdPack object before reusing it in the QSPI debug commands. Using sizeof(&cmd_pack) only clears the pointer-sized prefix and can leave stale fields in the command pack.
Generated-by: OpenAI Codex
Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
Check the buffer limits before reading ptr[i] in bufferred_fgets(). Also guard CR/LF skipping against the available input bytes so reading a full buffer does not inspect one byte past the source.
Generated-by: OpenAI Codex
Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
Move the command length checks before reading command buffers while parsing module, script, and LWP command names. This keeps commands without separators from reading one byte past the provided length.
Generated-by: OpenAI Codex
Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
_dac_control() checked the enabled callback before invoking disabled for RT_DAC_CMD_DISABLE. That can reject DAC drivers that provide a disable callback without enable, and can call through a NULL disabled callback when only enable is implemented.
Check the disabled callback in the disable command path so the guard matches the operation being dispatched.
Generated-by: OpenAI Codex
Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
The Renesas LCD helper treats LCD_WIDTH and LCD_HEIGHT as pixel counts. The framebuffer clear loop and lcd_draw_pixel() accepted those count values as valid indexes, which can write one pixel past the framebuffer.
Use strict bounds for the 0-based framebuffer indexes and adjust the 180-degree rotation mapping to target the last valid row and column.
Generated-by: OpenAI Codex
Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
The receive sequence filter maps incoming data-frame sequence numbers to zero-based frame offsets. RT_LINK_FRAMES_MAX is the maximum number of split frames, so valid offsets are 0 through RT_LINK_FRAMES_MAX - 1.
Reject offset == RT_LINK_FRAMES_MAX before frame handling instead of letting it reach long-frame assembly.
Generated-by: OpenAI Codex
Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
Validate the second and third digits of RA PXXX pin names against their own characters. The previous checks used name[1] for those upper bounds, so non-digit suffixes could pass validation.
Generated-by: OpenAI Codex
Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>