1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 14:33:52 +01:00

14 Commits

Author SHA1 Message Date
Marian Buschsieweke
c05d546bca
examples,tests: Update Makefile.ci
This updates the `Makefile.ci` entries for all MSP430 boards plus a few
low end Cortex-M boards.
2025-04-16 15:25:38 +02:00
Marian Buschsieweke
780a02ef6c
tests/drivers/candev: minor cleanup
- Do not hard code the number of the CAN interface to use. (This
  also allows specifying it via make command line / environment
  variable.)
- Make less use of preprocessor and rely on compiler to eliminate dead
  branches and unused variables.

Co-authored-by: crasbe <crasbe@gmail.com>
2025-04-06 20:19:16 +02:00
Marian Buschsieweke
a9ff36d68e
tests/drivers/candev: Drop SAME54-XPRO hack
Now that power management of the CAN transceiver is done by the driver,
we do no longer need a per-board hack in the app.
2025-03-12 16:05:40 +01:00
Gilles DOFFE
27fca7748a tests/drivers/candev: rework blacklisted boards
Update BOARD_INSUFFICIENT_MEMORY, stm32f030f4-demo is now usable with
candev example.

Signed-off-by: Gilles DOFFE <gilles.doffe@rtone.fr>
2025-02-10 17:20:58 +01:00
Gilles DOFFE
0bf08aa89b tests/conn_can: make test support CAN FD
Increase Shell buffer size for 64 bytes payload length of CAN FD frame.
This also implies to increase main thread stack size and especially for
native architectures.
Add two new sub-commands to test_can command:
* fdsend: to send a CAN FD frame
* fdsendrtr: to send a CAN FD RTR frame (payload length = 0).

Signed-off-by: Gilles DOFFE <gilles.doffe@rtone.fr>
2025-01-29 20:51:23 +01:00
Gilles DOFFE
f6f6f6973c can: introduce typedef can_frame_t
Whole CAN code in RIOT is using 'struct can_frame' to represent a CAN
frame.
However incoming CAN FD support will bring 'struct canfd_frame' to
represent CAN FD frames.
Even if the 'struct canfd_frame' has additional flags and a bigger
payload, it is aligned on 'struct can_frame' and thus they can be
referenced by the same pointers in the code.

As it is impossible to predict which one will be used in RIOT, just
define a new type 'can_frame_t' which will map to the right struct
according to the MCU CAN supported format.

Signed-off-by: Gilles DOFFE <gilles.doffe@rtone.fr>
2025-01-29 20:51:22 +01:00
Gilles DOFFE
ae51a22fbb can: use frame len instead of can_dlc
RIOT implementation of CAN bus relies on SocketCAN model.
Since commit c398e56 (can: add optional DLC element to Classical CAN
frame structure), '__u8 can_dlc' attribute of struct can_frame is
considered as deprecated in SocketCAN and kept for legacy support.
Attribute '__u8 len' should be used instead.

	union {
		/* CAN frame payload length in byte (0 .. CAN_MAX_DLEN)
		 * was previously named can_dlc so we need to carry that
		 * name for legacy support
		 */
		__u8 len;
		__u8 can_dlc; /* deprecated */
	};

Moreover, CAN FD frame structure does not support legacy attribute
'can_dlc', making 'len' mandatory for incoming CAN FD support in RIOT.

	struct canfd_frame {
		canid_t can_id;  /* 32 bit CAN_ID + EFF/RTR/ERR flags */
		__u8    len;     /* frame payload length in byte */
		__u8    flags;   /* additional flags for CAN FD */
		__u8    __res0;  /* reserved / padding */
		__u8    __res1;  /* reserved / padding */
		__u8    data[CANFD_MAX_DLEN]
__attribute__((aligned(8)));
	};

Signed-off-by: Gilles DOFFE <gilles.doffe@rtone.fr>
2025-01-29 20:51:22 +01:00
Marian Buschsieweke
e68d69f85e
tests/drivers/candev: prefer periph_can when available
This changes the app config to prefer periph_can whenever that feature
is provided, and fall back to mcp2515 as default if not.
2025-01-20 15:55:53 +01:00
Firas Hamdi
31003bf323 tests/drivers/candev: add debug output concerning errors 2024-05-16 15:00:28 +02:00
Firas Hamdi
491a1cdf2b tests/drivers/candev: add test commands 2024-03-26 15:17:48 +01:00
Frederik Haxel
5ed0bafc92 examples, tests: Changes for the native64 board
- Adapted build system and test checks for the native boards to include native64
- Added `native64` to the same tests as `native`
2024-02-05 22:02:14 +01:00
Marian Buschsieweke
edc43201db
tree-wide: fix typos in doc and comments
This should not change any generated binary
2023-10-16 12:17:48 +02:00
Hugues Larrive
3c465836f2 examples and tests: add atmega8 to relevent Makefile.ci
using dist/tools/insufficient_memory/add_insufficient_memory_board.sh
2023-07-11 21:22:02 +02:00
Alexandre Abadie
4020692be3
tests/candev: move to tests/drivers 2023-05-12 14:24:40 +02:00