Skip to content

Commit

Permalink
VC(PDU/FRONT/REAR) Initial Bringup
Browse files Browse the repository at this point in the history
Added BL and BLU support for nodes
Added yamcan base support for nodes
  • Loading branch information
JoshLafleur committed Mar 1, 2025
1 parent 56c8801 commit 455eef0
Show file tree
Hide file tree
Showing 152 changed files with 12,620 additions and 23 deletions.
2 changes: 1 addition & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ for target in target_dict:
config_ids = [int(id) for id in findall(CONFIG_ID_REGEX, target)]

target_sconscript = f"{components[component["component"]]['path']}SConscript"
PlatformEnv["ARTIFACTS"][f"{target.upper()}"] = SConscript(target_sconscript, exports={"CONFIG_IDS": config_ids, "PLATFORM_ENV": PlatformEnv, "NETWORK_ENV": NetworkEnv })
PlatformEnv["ARTIFACTS"][f"{target.upper()}"] = SConscript(target_sconscript, exports={"TARGET": target, "CONFIG_IDS": config_ids, "PLATFORM_ENV": PlatformEnv, "NETWORK_ENV": NetworkEnv })

if PlatformEnv["ARTIFACTS"]:
AddOption("--upload", dest="upload", action="store_true")
Expand Down
6 changes: 6 additions & 0 deletions components/bootloaders/STM/stm32f1/STM32F1.ld
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ SECTIONS
#error "Function not supported"
#endif

#if MCU_STM32_PN == FDEFS_STM32_PN_STM32F103XB
.isr_vector : ALIGN(0x100)
#elif MCU_STM32_PN == FDEFS_STM32_PN_STM32F105
.isr_vector : ALIGN(0x400)
#else
#error "Chipset not supported"
#endif
{
__app_start_addr = .;
KEEP(*(.isr_vector)) /* interrupt vector table */
Expand Down
28 changes: 21 additions & 7 deletions components/bootloaders/STM/stm32f1/include/HW/HW_specific.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@
# define CAN_TX_PORT GPIOB
# define CAN_TX_PIN 9U

#elif ((APP_COMPONENT_ID == FDEFS_COMPONENT_ID_BMSB) && (APP_PCBA_ID == 1U)) || (APP_PCBA_ID == 10U)
#elif ((APP_COMPONENT_ID == FDEFS_COMPONENT_ID_BMSB) && (APP_PCBA_ID == 1U)) || \
((APP_COMPONENT_ID == FDEFS_COMPONENT_ID_VCPDU) && (APP_PCBA_ID == 0U)) || \
((APP_COMPONENT_ID == FDEFS_COMPONENT_ID_VCFRONT) && (APP_PCBA_ID == 0U)) || \
((APP_COMPONENT_ID == FDEFS_COMPONENT_ID_VCREAR) && (APP_PCBA_ID == 0U)) || \
(APP_PCBA_ID == 10U)

# define CAN_AFIO_REMAP false
# define CAN_RX_PORT GPIOA
Expand All @@ -49,13 +53,23 @@
#define BUTTON_PIN 2U
#define BUTTON_PRESSED_STATE 1U

#define LED_PORT GPIOC
#define LED_PIN 13U
#define LED_ON_STATE 0U // this can probably be refactored
#if APP_PCBA_ID == 0
# define LED_MODE GPIO_CFG_OUTPUT_OPEN_DRAIN
#elif ((APP_COMPONENT_ID == FDEFS_COMPONENT_ID_BMSB) && (APP_PCBA_ID == 1U)) || (APP_PCBA_ID == 10U)
#if ((APP_COMPONENT_ID == FDEFS_COMPONENT_ID_VCPDU) && (APP_PCBA_ID == 0U))
# define LED_PORT GPIOB
# define LED_PIN 8U
#else
# define LED_PORT GPIOC
# define LED_PIN 13U
#endif
# define LED_ON_STATE 0U // this can probably be refactored

#if ((APP_COMPONENT_ID == FDEFS_COMPONENT_ID_BMSB) && (APP_PCBA_ID == 1U)) || \
((APP_COMPONENT_ID == FDEFS_COMPONENT_ID_VCPDU) && (APP_PCBA_ID == 0U)) || \
((APP_COMPONENT_ID == FDEFS_COMPONENT_ID_VCFRONT) && (APP_PCBA_ID == 0U)) || \
((APP_COMPONENT_ID == FDEFS_COMPONENT_ID_VCREAR) && (APP_PCBA_ID == 0U)) || \
(APP_PCBA_ID == 10U)
# define LED_MODE GPIO_CFG_OUTPUT_PUSH_PULL
#elif APP_PCBA_ID == 0
# define LED_MODE GPIO_CFG_OUTPUT_OPEN_DRAIN
#else
#error "Invalid configuration"
#endif
Expand Down
90 changes: 90 additions & 0 deletions components/bootloaders/STM/stm32f1/variants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -289,3 +289,93 @@ configs:
overrides:
app_pcba_id: 10
app_component_id: debug
30:
description: VCFRONT Bootloader
options:
udsRequestId: 0x630
udsResponseId: 0x670
features:
selections:
- "#/components/shared/FeatureSels/STM32F105_FeatureSels.yaml"
- "#/components/shared/FeatureSels/BOOT_V1_FeatureSels.yaml"
- "FeatureSels.yaml"
overrides:
app_pcba_id: 0
app_component_id: vcpdu
app_validation_enabled: true
feature_erase_invalid_app: false
1030:
description: VCFRONT Bootloader Updater
options:
udsRequestId: 0x630
udsResponseId: 0x670
features:
selections:
- "#/components/shared/FeatureSels/STM32F105_FeatureSels.yaml"
- "#/components/shared/FeatureSels/BOOTUPDATER_V1_FeatureSels.yaml"
- "FeatureSels.yaml"
overrides:
app_pcba_id: 0
app_component_id: vcpdu
app_validation_enabled: true
feature_erase_invalid_app: false
31:
description: VCREAR Bootloader
options:
udsRequestId: 0x631
udsResponseId: 0x671
features:
selections:
- "#/components/shared/FeatureSels/STM32F105_FeatureSels.yaml"
- "#/components/shared/FeatureSels/BOOT_V1_FeatureSels.yaml"
- "FeatureSels.yaml"
overrides:
app_pcba_id: 0
app_component_id: vcpdu
app_validation_enabled: true
feature_erase_invalid_app: false
1031:
description: VCREAR Bootloader Updater
options:
udsRequestId: 0x631
udsResponseId: 0x671
features:
selections:
- "#/components/shared/FeatureSels/STM32F105_FeatureSels.yaml"
- "#/components/shared/FeatureSels/BOOTUPDATER_V1_FeatureSels.yaml"
- "FeatureSels.yaml"
overrides:
app_pcba_id: 0
app_component_id: vcpdu
app_validation_enabled: true
feature_erase_invalid_app: false
32:
description: VCPDU Bootloader
options:
udsRequestId: 0x632
udsResponseId: 0x672
features:
selections:
- "#/components/shared/FeatureSels/STM32F105_FeatureSels.yaml"
- "#/components/shared/FeatureSels/BOOT_V1_FeatureSels.yaml"
- "FeatureSels.yaml"
overrides:
app_pcba_id: 0
app_component_id: vcpdu
app_validation_enabled: true
feature_erase_invalid_app: false
1032:
description: VCPDU Bootloader Updater
options:
udsRequestId: 0x632
udsResponseId: 0x672
features:
selections:
- "#/components/shared/FeatureSels/STM32F105_FeatureSels.yaml"
- "#/components/shared/FeatureSels/BOOTUPDATER_V1_FeatureSels.yaml"
- "FeatureSels.yaml"
overrides:
app_pcba_id: 0
app_component_id: vcpdu
app_validation_enabled: true
feature_erase_invalid_app: false
3 changes: 3 additions & 0 deletions components/shared/FeatureDefs/Application_FeatureDefs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ discreteValues:
- bmsw
- bmsb
- stw
- vcpdu
- vcfront
- vcrear
function_id:
- bl
- app
Expand Down
Loading

0 comments on commit 455eef0

Please sign in to comment.