374 Commits

Author SHA1 Message Date
Venelin Efremov
4ae1a7c2ad usbd_gs_can: add support for GS_USB_BREQ_DATA_BITTIMING and GS_USB_BREQ_BT_CONST_EXT 2024-06-06 09:56:12 +02:00
Ryan Edwards
4dad6a10d2 usbd_gs_can: add USB defines for SMT32G0 2024-06-06 09:56:12 +02:00
Marc Kleine-Budde
f0004f9a46 usbd_gs_can: USBD_GS_CAN_Config_Request(): add missing initialization of channel 2024-06-06 09:56:12 +02:00
Marc Kleine-Budde
b62d47dff2 can: can_check_bittiming_failed(): introduce function to check bittiming 2024-06-06 09:56:12 +02:00
Marc Kleine-Budde
5fb636c4bc usbd: move cast from strings to uint8_t to USBD_GetString() 2024-06-06 09:56:12 +02:00
Marc Kleine-Budde
b07d81293c dfu: add support for STM32G0B1 2024-06-06 09:56:12 +02:00
Marc Kleine-Budde
b88e9597a4 cmake: stm32g0b1xx: decrease flash size to 128k
The smallest model of the stm32g0b1 series, i.e. the stm32g0b1xb, has
only 128 KiBytes of RAM. In order to support these chips, adjust the
input for the linker script generation accordingly.

Closes: https://github.com/candle-usb/candleLight_fw/issues/174
2024-06-06 09:56:12 +02:00
Marc Kleine-Budde
a876208913 cmake: rename STM32G0B1XK -> STM32G0B1xx
According to DS13560 Rev 4, 7 Ordering information, there is no
STM32G0B1XK "K" model. Rename each occurrence of STM32G0B1XK to
STM32G0B1xx

Fixes: e8d82ef7ae01 ("Add the CMake files to support the STM32G0")
Closes: https://github.com/candle-usb/candleLight_fw/issues/174
2024-06-06 09:56:12 +02:00
Marc Kleine-Budde
56e4515086 cmake: create linker map by default 2024-06-06 09:56:12 +02:00
Marc Kleine-Budde
7a97b303d9 cmake: cleanup helper functions comments 2024-06-06 09:56:09 +02:00
Marc Kleine-Budde
4ebdff3af0 cmake: flash-target: use :leave instead of USB reset
Even the dfu-util on Ubuntu 20.04 supports ":leave". Use it during
flashing.
2024-06-06 09:55:11 +02:00
Marc Kleine-Budde
56e062269f cmake: fix dependencies for flash targets
By adding these dependencies, there's no need to compile the firmware
before calling `make FIRMWARE_flash`.
2024-06-06 09:55:11 +02:00
Marc Kleine-Budde
72fe9e0c2e cmake: remove whitespace after '(' and before ')' 2024-06-06 09:55:11 +02:00
Marc Kleine-Budde
a897d8f0e6 cmake: fix indention 2024-06-06 09:55:11 +02:00
Marc Kleine-Budde
c07abdf011 cmake: FindDFUSuffix: convert to Unix line endings 2024-06-06 09:55:11 +02:00
Marc Kleine-Budde
8c9f7156f0 gitignore: add .ccls-cache 2024-06-06 09:55:11 +02:00
Marc Kleine-Budde
819891fec5 workflows: update CI to compile on various Debian based distributions
Use containers to build on various Debian based distributions:

- Ubuntu: 20.04
- Ubuntu: 22.04
- Ubuntu: 24.04
- Ubuntu: rolling
- Debian: oldstable
- Debian: stable
- Debian: testing
- Debian: unstable
2024-06-06 09:54:16 +02:00
Marc Kleine-Budde
a41b0bd548 workflows: pr: update actions/checkout to v4 2024-06-06 09:54:16 +02:00
Marc Kleine-Budde
ffc7fb7f4c editorconfig: apply indent with 2 spaces for yml files
This is the default for yml files for the github workflows.
2024-06-06 09:54:00 +02:00
fenugrec
3e79d97353 README: document echo frame limitation
echo frame is generated earlier than ideal which is acceptable for most but not all use cases.
2024-06-05 12:08:06 -04:00
Maarten de Vries
fcd3acf692 bxcan: advertise supported one-shot feature 2024-06-05 12:03:15 -04:00
fenugrec
b544b65261 README: improve sample uncrustify command
--no-backup is probably always wanted, and self explanatory enough
2024-06-05 12:00:58 -04:00
Marc Kleine-Budde
acb299e240 main: provide weak symbols for _close, _lseek, _read, _write
This increases the size of the binary in a stm32f072 a bit:

before:
Memory region         Used Size  Region Size  %age Used
           FLASH:       17296 B       128 KB     13.20%
             RAM:        4268 B        16 KB     26.05%

after:
Memory region         Used Size  Region Size  %age Used
           FLASH:       17312 B       128 KB     13.21%
             RAM:        4268 B        16 KB     26.05%

Closes: https://github.com/candle-usb/candleLight_fw/issues/164
2024-06-04 21:07:04 +02:00
Marc Kleine-Budde
eab3d53d10 config: uncrustify 2024-06-04 20:55:17 +02:00
Marc Kleine-Budde
031ca1acd7 config: add "1" to CONFIG_CANFD define
This way uncrustify produces better indention.
2024-06-04 20:55:17 +02:00
Marc Kleine-Budde
beb27bdb92 config: remove comments about not connected silent pin
This way uncrustify produces better indention.
2024-06-04 20:55:17 +02:00
Marc Kleine-Budde
8fe56214b4 config: usb2can: remove unused LED3 and LED4 defines
Fixes: 89c44fe3f137 ("correct LED initialization for canable interfaces")
2024-06-04 20:55:14 +02:00
Marc Kleine-Budde
98b95a9baf include/*.h: uncrustify 2024-06-04 15:36:22 +02:00
Marc Kleine-Budde
c2a913c44c uncrustify: upgrade to 0.78.1_f 2024-06-04 15:33:29 +02:00
Sebastian Kuzminsky
7fb46a8b34 README: note that CANable-MKS 1.0 is supported, not 2.0
This clarification would have helped me avoid confusion leading to issue
180 <https://github.com/candle-usb/candleLight_fw/issues/180>
2024-05-22 09:16:52 -06:00
Sebastian Kuzminsky
8c63bcf98c README: fix markdown url markup, no content changes 2024-05-22 09:13:29 -06:00
Marc Kleine-Budde
b1e557b0cd bxcan: can_set_bittiming(): evaluate gs_device_bittiming in CAN driver 2024-01-30 11:48:52 +01:00
Marc Kleine-Budde
ad72111d65 bxcan: move CAN_btconst to CAN driver 2024-01-30 11:48:52 +01:00
Marc Kleine-Budde
206de0067a can: can_enable: move the mode flags evaluation into the CAN drivers
...having so many arguments doesn't scale.
2024-01-30 11:48:52 +01:00
Marc Kleine-Budde
45424cf541 can: move RX timestamp into CAN driver 2024-01-30 11:48:52 +01:00
Marc Kleine-Budde
51e155073b led: use uppercase for defines 2024-01-30 11:48:52 +01:00
Marc Kleine-Budde
5a0b687bef usbd_gs_can: USBD_GS_CAN_SendFrame(): disable pad_pkts_to_max_pkt_size feature for CAN-FD frames 2024-01-30 11:48:52 +01:00
Marc Kleine-Budde
65c6eefc8b usbd_gs_can: USBD_GS_CAN_GetCfgDesc(): add comment why the USBD_GS_CAN_CfgDesc is copied to RAM 2024-01-30 11:48:52 +01:00
Venelin Efremov
fe0eef5e8f can_common: CAN_SendFrame(): add support for CAN-FD 2024-01-30 11:48:52 +01:00
Marc Kleine-Budde
d31be9d3e0 can: CAN_HandleError(): assign channel 2024-01-30 11:48:52 +01:00
Marc Kleine-Budde
3a9e42a242 can: move assignment of rx_frame::channel and ::flags into bxcan 2024-01-30 11:48:52 +01:00
Jonas Martin
067be8321a can: move bxcan code into separate file 2024-01-30 11:48:52 +01:00
Marc Kleine-Budde
34cbcf021c usbd_gs_can: add support for CAN-FD to USB path 2024-01-30 11:48:52 +01:00
Marc Kleine-Budde
f83fdd8371 usbd_gs_can: import struct gs_host_frame from kernel and adopt code 2024-01-30 11:48:52 +01:00
Marc Kleine-Budde
84ec4d5501 can: rename can_data_t hcan -> channel
No functional change.
2024-01-30 11:48:52 +01:00
Marc Kleine-Budde
fd1c0c8471 main: make CAN handling multichannel capable 2024-01-30 11:48:52 +01:00
Marc Kleine-Budde
7f037fc7d6 can_common: remove some levels of indention 2024-01-30 11:48:52 +01:00
Marc Kleine-Budde
78bafcf07b main: move per channel CAN handling code out of main loop into separate functions
No functional change intended.
2024-01-30 11:48:52 +01:00
Marc Kleine-Budde
844e6c31f4 usbd_gs_can: USBD_GS_CAN_SendFrame(): call USBD_GS_CAN_Transmit() with IRQs enabled 2024-01-30 11:48:52 +01:00
Marc Kleine-Budde
7fba5612ae usbd_gs_can: USBD_GS_CAN_ReceiveFromHost(): call USBD_GS_CAN_PrepareReceive() with IRQs enabled 2024-01-30 11:48:52 +01:00