Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

155 clean unused firmware components #185

Merged
merged 27 commits into from
Feb 12, 2025

Conversation

gdoffe
Copy link
Contributor

@gdoffe gdoffe commented Feb 11, 2025

This PR removes from firmware all legacy code and unused modules.
Each deprecated module is removed in a specific commit in case of revert needed.

@gdoffe gdoffe added the refactoring Code refactoring label Feb 11, 2025
@gdoffe gdoffe requested review from ecourtois and mlecriva February 11, 2025 00:11
@gdoffe gdoffe self-assigned this Feb 11, 2025
@gdoffe gdoffe linked an issue Feb 11, 2025 that may be closed by this pull request
@gdoffe gdoffe force-pushed the 155-clean-unused-firmware-components branch from 0e6f99e to 95d4342 Compare February 11, 2025 00:14
Copy link
Contributor

@mlecriva mlecriva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me, only one comment about cogip-board-pami

@@ -19,6 +19,7 @@
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion you can also remove cogip board PAMI as cogip-board is the only one used in applications

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, done.

@@ -6,3 +6,6 @@ PORT = "/dev/ttyUSB0"

# Setup of programmer and serial is shared between STM32 based boards
include $(RIOTMAKE)/boards/stm32.inc.mk

# Set onboard transceiver loop delay
CFLAGS += -DCONFIG_FDCAN_DEVICE_TRANSCEIVER_LOOP_DELAY=130
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you determine this value ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can find it inside the datasheet:
image

I choose a value that is inside both ranges, nominal and highly loaded network. i added this to the commit message:

The TCAN332GDCNR CAN transceiver datasheet exposes two ranges for this          
value:                                                                          
- Nominal range: 100 (typical) to 135 (max)                                     
- Highly loaded network: 120 (typical) to 180 (max)                             
                                                                                
So here the value 130 is choosen as it is inside both ranges.                   
This value has been tested in nominal robot working conditions.    

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok ! Thank's

@gdoffe gdoffe force-pushed the 155-clean-unused-firmware-components branch from 6fb685b to 5466f13 Compare February 12, 2025 10:53
In latest versions of RIOT, stdio.h is not systematically included at
board level, so include it manually.

Signed-off-by: Gilles DOFFE <[email protected]>
Compensate for transceiver loop delay in FDCAN timing

The transceiver loop delay introduces a lag between sending and
receiving messages in FDCAN due to internal processing. This delay
affects bit timing, especially in high-speed communication, and can lead
to synchronization issues.

This commit adjusts this timing parameters as it is mandatory for the
new RIOT fdcan driver implementation.

Signed-off-by: Gilles DOFFE <[email protected]>
This feature has been renamed in RIOT.

Signed-off-by: Gilles DOFFE <[email protected]>
Since RIOT commit e93b5e4b98, thread_measure_stack_free() prototype has
changed to fixed.
Update it to be compliant with new RIOT versions.

Signed-off-by: Gilles DOFFE <[email protected]>
This driver is not used anymore since lidar management has been moved to
the Raspberry Pi4.

Signed-off-by: Gilles DOFFE <[email protected]>
SD21 analog servo driver board, derived from SD12 board is not used
since 2019 robotic cup and can thus be removed.

Signed-off-by: Gilles DOFFE <[email protected]>
Vacuum pump driver board, is not used anymore since
2023 robotic cup and can thus be removed safely.

Signed-off-by: Gilles DOFFE <[email protected]>
The cup2024-pami application is specific to French robotic cup 2024 and
PAMIs architecture will change in 2025, thus remove it.

Signed-off-by: Gilles DOFFE <[email protected]>
The pf-pami platform is specific to French robotic cup 2024 and PAMIs
architecture will change in 2025, thus remove it.

Signed-off-by: Gilles DOFFE <[email protected]>
Analog servomotors are not used anymore and numerical servomotors are
now managed directly by the Raspberry Pi.
So remove all code related to servomotors, analog or numerical from
pf-robot-actuators platform.

Signed-off-by: Gilles DOFFE <[email protected]>
Analog servomotors are not used anymore in favor of numerical
servomotors directly driven by the Raspberry Pi4, thus remove the
driver.

Signed-off-by: Gilles DOFFE <[email protected]>
LX servomotors are not used anymore and have been replaced by Waveshare
servomotors directly driven by the Raspberry Pi4.

Signed-off-by: Gilles DOFFE <[email protected]>
No more drivers are handled specifically by the firmware, thus delete
the drivers folder.

Signed-off-by: Gilles DOFFE <[email protected]>
Avoidance has been moved to the Raspberry Pi4 and this library is then
not used anymore, remove it.

Signed-off-by: Gilles DOFFE <[email protected]>
Obstacle management has been moved to the Raspberry Pi4 and this library
is then not used anymore, remove it.

Signed-off-by: Gilles DOFFE <[email protected]>
The pure C quadpid motion controller has been ported to C++ through new
implementation.
The quadpid and the common controller part has been kept as a fall back,
but the new motion control modules are now fully operationals.
Remove quadpid and common_controller.

Signed-off-by: Gilles DOFFE <[email protected]>
Old pure C PID module has been replaced by C++ pid_ng module.
Remove it.

Signed-off-by: Gilles DOFFE <[email protected]>
As legacy PID implementation has been removed, rename pid_ng to pid.

Signed-off-by: Gilles DOFFE <[email protected]>
As it is done now on the Raspberry Pi4, this code is no more used nor
maintained.

Signed-off-by: Gilles DOFFE <[email protected]>
The uartpb protocol is handling protobuf messages over uart.
However all COGIP boards are now using canpb to handle protobuf messages
over CAN bus.

The uartpb protocol is now legacy and not maintained any more, thus
remove it.

Signed-off-by: Gilles DOFFE <[email protected]>
The shmem module was used forcommunication with old versions of
simulator.
This module is no more used for a long time so remove it.

Signed-off-by: Gilles DOFFE <[email protected]>
As all menus are now displayed on the Raspberry Pi4, console menu on
RIOT is no more relevant and is not used anymore.

Signed-off-by: Gilles DOFFE <[email protected]>
These directories are now empty, remove them.

Signed-off-by: Gilles DOFFE <[email protected]>
As shell_menu module does not exist anymore, remove parsing for shell
menu commands modules.

Signed-off-by: Gilles DOFFE <[email protected]>
@gdoffe gdoffe force-pushed the 155-clean-unused-firmware-components branch 2 times, most recently from 8d41936 to fb35c8d Compare February 12, 2025 11:00
The transceiver loop delay introduces a lag between sending and
receiving messages in FDCAN due to internal processing. This delay
affects bit timing, especially in high-speed communication, and can lead
to synchronization issues.
The TCAN332GDCNR CAN transceiver datasheet [1] exposes two ranges for this
value:
- Nominal range: 100 (typical) to 135 (max)
- Highly loaded network: 120 (typical) to 180 (max)

So here the value 130 is choosen as it is inside both ranges.
This value has been tested in nominal robot working conditions.

[1] https://www.ti.com/lit/ds/symlink/tcan332g.pdf

Signed-off-by: Gilles DOFFE <[email protected]>
@gdoffe gdoffe force-pushed the 155-clean-unused-firmware-components branch from fb35c8d to 998501f Compare February 12, 2025 11:04
@gdoffe gdoffe requested a review from mlecriva February 12, 2025 11:04
The transceiver loop delay introduces a lag between sending and
receiving messages in FDCAN due to internal processing. This delay
affects bit timing, especially in high-speed communication, and can lead
to synchronization issues.
Fake the value here as cogip-native is for simulation.

Signed-off-by: Gilles DOFFE <[email protected]>
This board is not used anymore as cogip-board is also used in PAMIs.

Signed-off-by: Gilles DOFFE <[email protected]>
@mlecriva
Copy link
Contributor

LGTM

@gdoffe gdoffe merged commit 453e5e9 into master Feb 12, 2025
1 check passed
@gdoffe gdoffe deleted the 155-clean-unused-firmware-components branch February 12, 2025 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Code refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean unused firmware components
2 participants