From 3b8afa43533195e0f5381f0b57113dc09fbcc19e Mon Sep 17 00:00:00 2001 From: Rijwal Sangey Date: Mon, 13 Jul 2026 12:32:45 -0700 Subject: [PATCH 1/4] simple --- .vscode/launch.json | 134 ++++++------------ .vscode/tasks.json | 18 +-- firmware/hexray/PCM/src/cubemx/Inc/main.h | 1 + .../hexray/PCM/src/cubemx/Inc/stm32f4xx_it.h | 1 + firmware/hexray/PCM/src/cubemx/PCM.ioc | 13 +- firmware/hexray/PCM/src/cubemx/PCM.ioc.md5 | 2 +- firmware/hexray/PCM/src/cubemx/Src/main.c | 6 +- .../hexray/PCM/src/cubemx/Src/stm32f4xx_it.c | 14 ++ .../VC/src/app/states/app_driveState.cpp | 16 +-- firmware/hexray/VC/src/tasks.cpp | 4 +- 10 files changed, 88 insertions(+), 121 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index d27bedbdb5..652fbfc7cc 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -27,6 +27,7 @@ ], "console": "integratedTerminal" }, + // ========== HEXRAY CHIMERA ========== { "name": "Debug Chimera: VC (Hexray)", "cwd": "${workspaceRoot}", @@ -273,6 +274,7 @@ ] } }, + // ========== HEXRAY BOARDS ========== { "name": "Debug Embedded: CRIT (Hexray)", "cwd": "${workspaceRoot}", @@ -315,6 +317,43 @@ ] } }, + { + "name": "Debug Embedded: PCM (Hexray)", + "cwd": "${workspaceRoot}", + "executable": "build_fw_dev/firmware/hexray/PCM/hexray_PCM_app.elf", + "preLaunchTask": "Build Embedded: PCM (Hexray)", + // cortex configurations + "request": "launch", + "type": "cortex-debug", + "servertype": "jlink", + "linux": { + "serverpath": "JLinkGDBServerCLExe" + }, + "osx": { + "serverpath": "JLinkGDBServer" + }, + "windows": { + "serverpath": "JLinkGDBServerCL" + }, + "serverArgs": [ + "-speed", + "4000" + ], + "device": "STM32F412RG", + "interface": "swd", + "showDevDebugOutput": "none", + "rttConfig": { + "enabled": true, + "address": "auto", + "decoders": [ + { + "label": "Debug logs: PCM", + "port": 0, + "type": "console" + } + ] + } + }, { "name": "Debug Embedded: VC (Hexray)", "cwd": "${workspaceRoot}", @@ -526,6 +565,7 @@ ] } }, + // ========== QUINTUNA BOARDS (remove) ========== { "name": "Debug Embedded: VC (Quintuna)", "cwd": "${workspaceRoot}", @@ -779,84 +819,6 @@ ] } }, - { - "name": "Debug Embedded: VCR (Quintuna)", - "cwd": "${workspaceRoot}", - "executable": "build_fw_dev/firmware/quintuna/VCR/quintuna_VCR_app.elf", - "symbolFiles": [ - // This order matters, or RTT won't work! (app has to be last) - "build_fw_dev/firmware/quintuna/VCR/quintuna_VCR_app.elf" - ], - "preLaunchTask": "Build Embedded: VCR (Quintuna)", - // cortex configurations - "request": "launch", - "type": "cortex-debug", - "servertype": "jlink", - "linux": { - "serverpath": "JLinkGDBServerCLExe" - }, - "osx": { - "serverpath": "JLinkGDBServer" - }, - "windows": { - "serverpath": "JLinkGDBServerCL" - }, - "serverArgs": [ - "-speed", - "4000" - ], - "device": "STM32H733VG", - "interface": "swd", - "showDevDebugOutput": "none", - "rttConfig": { - "enabled": true, - "address": "auto", - "decoders": [ - { - "label": "Debug logs: VCR", - "port": 0, - "type": "console" - } - ] - } - }, - { - "name": "Debug Embedded: PCM (Quintuna)", - "cwd": "${workspaceRoot}", - "executable": "build_fw_dev/firmware/quintuna/PCM/quintuna_PCM_app.elf", - "preLaunchTask": "Build Embedded: PCM (Quintuna)", - // cortex configurations - "request": "launch", - "type": "cortex-debug", - "servertype": "jlink", - "linux": { - "serverpath": "JLinkGDBServerCLExe" - }, - "osx": { - "serverpath": "JLinkGDBServer" - }, - "windows": { - "serverpath": "JLinkGDBServerCL" - }, - "serverArgs": [ - "-speed", - "4000" - ], - "device": "STM32F412RG", - "interface": "swd", - "showDevDebugOutput": "none", - "rttConfig": { - "enabled": true, - "address": "auto", - "decoders": [ - { - "label": "Debug logs: VCR", - "port": 0, - "type": "console" - } - ] - } - }, { "name": "Debug Embedded: SSM", "cwd": "${workspaceRoot}", @@ -898,6 +860,7 @@ ] } }, + // ========== DEV BOARDS ========== { "name": "Debug Embedded: h7dev", "cwd": "${workspaceRoot}", @@ -1065,20 +1028,6 @@ "MIMode": "lldb" } }, - { - "name": "Debug Tests: BMS (Quintuna)", - "type": "cppdbg", - "request": "launch", - "program": "${workspaceRoot}/build_fw_test/firmware/quintuna/BMS/quintuna_BMS_test", - "cwd": "${workspaceRoot}", - "preLaunchTask": "Build Tests: BMS (Quintuna)", - "linux": { - "MIMode": "gdb" - }, - "osx": { - "MIMode": "lldb" - } - }, { "name": "Debug Tests: FSM (Hexray)", "type": "cppdbg", @@ -1149,6 +1098,7 @@ "MIMode": "lldb" } }, + // ======================== { "name": "Debug Tests: JSON CAN intergation", "type": "cppdbg", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 7ba5b7d383..a903fcf6f0 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -142,15 +142,6 @@ "quintuna_FSM.hex", ] }, - { - "label": "Build Embedded: PCM (Quintuna)", - "group": "build", - "type": "cmake", - "command": "build", - "targets": [ - "quintuna_PCM_app.elf", - ] - }, { "label": "Build Embedded: h7dev", "group": "build", @@ -313,6 +304,15 @@ "hexray_FSM_chimera.elf" ] }, + { + "label": "Build Embedded: PCM (Hexray)", + "group": "build", + "type": "cmake", + "command": "build", + "targets": [ + "hexray_PCM_app.elf", + ] + }, { "label": "Build Embedded: RSM (Hexray)", "group": "build", diff --git a/firmware/hexray/PCM/src/cubemx/Inc/main.h b/firmware/hexray/PCM/src/cubemx/Inc/main.h index eb80b05572..dee46475fd 100644 --- a/firmware/hexray/PCM/src/cubemx/Inc/main.h +++ b/firmware/hexray/PCM/src/cubemx/Inc/main.h @@ -70,6 +70,7 @@ extern "C" #define SWO_GPIO_Port GPIOB #define PCM_EN_Pin GPIO_PIN_5 #define PCM_EN_GPIO_Port GPIOB +#define PCM_EN_EXTI_IRQn EXTI9_5_IRQn #define VICOR_SMBUS_SCL_Pin GPIO_PIN_6 #define VICOR_SMBUS_SCL_GPIO_Port GPIOB #define VICOR_SMBUS_SDA_Pin GPIO_PIN_7 diff --git a/firmware/hexray/PCM/src/cubemx/Inc/stm32f4xx_it.h b/firmware/hexray/PCM/src/cubemx/Inc/stm32f4xx_it.h index a53790154b..b1474f0e1f 100644 --- a/firmware/hexray/PCM/src/cubemx/Inc/stm32f4xx_it.h +++ b/firmware/hexray/PCM/src/cubemx/Inc/stm32f4xx_it.h @@ -54,6 +54,7 @@ extern "C" void UsageFault_Handler(void); void DebugMon_Handler(void); void SysTick_Handler(void); + void EXTI9_5_IRQHandler(void); void I2C1_EV_IRQHandler(void); void I2C1_ER_IRQHandler(void); /* USER CODE BEGIN EFP */ diff --git a/firmware/hexray/PCM/src/cubemx/PCM.ioc b/firmware/hexray/PCM/src/cubemx/PCM.ioc index 2fa5e7f038..73558d9f23 100644 --- a/firmware/hexray/PCM/src/cubemx/PCM.ioc +++ b/firmware/hexray/PCM/src/cubemx/PCM.ioc @@ -24,14 +24,14 @@ Mcu.Pin6=PB6 Mcu.Pin7=PB7 Mcu.Pin8=VP_SYS_VS_Systick Mcu.PinsNb=9 -Mcu.ThirdParty0=STMicroelectronics.X-CUBE-SMBUS.2.1.0 -Mcu.ThirdPartyNb=1 +Mcu.ThirdPartyNb=0 Mcu.UserConstants= Mcu.UserName=STM32F412RGTx MxCube.Version=6.15.0 MxDb.Version=DB.6.0.150 NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.EXTI9_5_IRQn=true\:5\:0\:true\:false\:true\:true\:true\:true NVIC.ForceEnableDMAVector=true NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false NVIC.I2C1_ER_IRQn=true\:5\:0\:true\:false\:true\:true\:true\:true @@ -65,7 +65,7 @@ PB3.Signal=SYS_JTDO-SWO PB5.GPIOParameters=GPIO_Label PB5.GPIO_Label=PCM_EN PB5.Locked=true -PB5.Signal=GPIO_Input +PB5.Signal=GPXTI5 PB6.GPIOParameters=GPIO_Label PB6.GPIO_Label=VICOR_SMBUS_SCL PB6.Locked=true @@ -144,11 +144,8 @@ RCC.VCOI2SInputFreq_Value=1000000 RCC.VCOI2SOutputFreq_Value=192000000 RCC.VCOInputFreq_Value=1000000 RCC.VCOOutputFreq_Value=192000000 -STMicroelectronics.X-CUBE-SMBUS.2.1.0.ApplicationJjApplication_Checked=false -STMicroelectronics.X-CUBE-SMBUS.2.1.0.IPParameters=SMB_master -STMicroelectronics.X-CUBE-SMBUS.2.1.0.SMB_master=1 -STMicroelectronics.X-CUBE-SMBUS.2.1.0.SMbusJjSMBusIiPMBusIiStack_Checked=false -STMicroelectronics.X-CUBE-SMBUS.2.1.0_SwParameter=ApplicationCcApplicationJjApplication\:true;SMBusIiPMBusIiStackCcSMbusJjSMBus\:true; +SH.GPXTI5.0=GPIO_EXTI5 +SH.GPXTI5.ConfNb=1 VP_SYS_VS_Systick.Mode=SysTick VP_SYS_VS_Systick.Signal=SYS_VS_Systick board=custom diff --git a/firmware/hexray/PCM/src/cubemx/PCM.ioc.md5 b/firmware/hexray/PCM/src/cubemx/PCM.ioc.md5 index 5beeee5469..f57a2faf26 100644 --- a/firmware/hexray/PCM/src/cubemx/PCM.ioc.md5 +++ b/firmware/hexray/PCM/src/cubemx/PCM.ioc.md5 @@ -1 +1 @@ -9075300837875b8e54de77a35ad094c7 \ No newline at end of file +8b15e3c5bb0920d84cde3bc61402d5e6 \ No newline at end of file diff --git a/firmware/hexray/PCM/src/cubemx/Src/main.c b/firmware/hexray/PCM/src/cubemx/Src/main.c index c5dde76221..e778efa4bc 100644 --- a/firmware/hexray/PCM/src/cubemx/Src/main.c +++ b/firmware/hexray/PCM/src/cubemx/Src/main.c @@ -220,10 +220,14 @@ static void MX_GPIO_Init(void) /*Configure GPIO pin : PCM_EN_Pin */ GPIO_InitStruct.Pin = PCM_EN_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_INPUT; + GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(PCM_EN_GPIO_Port, &GPIO_InitStruct); + /* EXTI interrupt init*/ + HAL_NVIC_SetPriority(EXTI9_5_IRQn, 5, 0); + HAL_NVIC_EnableIRQ(EXTI9_5_IRQn); + /* USER CODE BEGIN MX_GPIO_Init_2 */ /* USER CODE END MX_GPIO_Init_2 */ diff --git a/firmware/hexray/PCM/src/cubemx/Src/stm32f4xx_it.c b/firmware/hexray/PCM/src/cubemx/Src/stm32f4xx_it.c index ba0962d09f..c4667989b8 100644 --- a/firmware/hexray/PCM/src/cubemx/Src/stm32f4xx_it.c +++ b/firmware/hexray/PCM/src/cubemx/Src/stm32f4xx_it.c @@ -173,6 +173,20 @@ void SysTick_Handler(void) /* please refer to the startup file (startup_stm32f4xx.s). */ /******************************************************************************/ +/** + * @brief This function handles EXTI line[9:5] interrupts. + */ +void EXTI9_5_IRQHandler(void) +{ + /* USER CODE BEGIN EXTI9_5_IRQn 0 */ + + /* USER CODE END EXTI9_5_IRQn 0 */ + HAL_GPIO_EXTI_IRQHandler(PCM_EN_Pin); + /* USER CODE BEGIN EXTI9_5_IRQn 1 */ + + /* USER CODE END EXTI9_5_IRQn 1 */ +} + /** * @brief This function handles I2C1 event interrupt. */ diff --git a/firmware/hexray/VC/src/app/states/app_driveState.cpp b/firmware/hexray/VC/src/app/states/app_driveState.cpp index 141943201e..e026227f12 100644 --- a/firmware/hexray/VC/src/app/states/app_driveState.cpp +++ b/firmware/hexray/VC/src/app/states/app_driveState.cpp @@ -18,14 +18,14 @@ using namespace app::powerManager; using namespace app::tv::datatypes::torque_limits; static constexpr Efuses power_manager_state = { - .front_efuse = { true, 0, 5 }, // front - .rsm_efuse = { true, 0, 5 }, // rsm - .bms_efuse = { true, 0, 5 }, // bms - .dam_efuse = { true, 0, 5 }, // dam - .f_inv_efuse = { true, 200, 5 }, // f_inv - .r_inv_efuse = { true, 200, 5 }, // r_inv - .r_rad_fan_efuse = { true, 200, 5 }, // r_rad_fan - .l_rad_fan_efuse = { true, 200, 5 }, // l_rad_fan + .front_efuse = { true, 0, 5 }, // front + .rsm_efuse = { true, 0, 5 }, // rsm + .bms_efuse = { true, 0, 5 }, // bms + .dam_efuse = { true, 0, 5 }, // dam + .f_inv_efuse = { true, 200, 5 }, // f_inv + .r_inv_efuse = { true, 200, 5 }, // r_inv + .r_rad_fan_efuse = { true, 200, 5 }, // r_rad_fan + .l_rad_fan_efuse = { true, 200, 5 }, // l_rad_fan .rr_pump_efuse = { true, 200, 5 }, // rr_pump .rl_pump_efuse = { true, 200, 5 }, // rl_pump }; diff --git a/firmware/hexray/VC/src/tasks.cpp b/firmware/hexray/VC/src/tasks.cpp index 7d9d268789..5180f5c73c 100644 --- a/firmware/hexray/VC/src/tasks.cpp +++ b/firmware/hexray/VC/src/tasks.cpp @@ -255,13 +255,13 @@ static void VC_StartAllTasks() Task100Hz.start(); Task1kHz.start(); Task1Hz.start(); - TaskImu.start(); + // TaskImu.start(); TaskCanRx.start(); TaskCan1Tx.start(); TaskCan2Tx.start(); // TaskBatteryMonitoring.start(); TaskPowerMonitoring.start(); - TaskSbgEllipse.start(); + // TaskSbgEllipse.start(); } void tasks_preInit() From 07cd7355ad766e330b6ae60115cd026991bb6354 Mon Sep 17 00:00:00 2001 From: Rijwal Sangey Date: Mon, 13 Jul 2026 12:35:48 -0700 Subject: [PATCH 2/4] undo testing stuff --- .../hexray/VC/src/app/states/app_driveState.cpp | 16 ++++++++-------- firmware/hexray/VC/src/tasks.cpp | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/firmware/hexray/VC/src/app/states/app_driveState.cpp b/firmware/hexray/VC/src/app/states/app_driveState.cpp index e026227f12..141943201e 100644 --- a/firmware/hexray/VC/src/app/states/app_driveState.cpp +++ b/firmware/hexray/VC/src/app/states/app_driveState.cpp @@ -18,14 +18,14 @@ using namespace app::powerManager; using namespace app::tv::datatypes::torque_limits; static constexpr Efuses power_manager_state = { - .front_efuse = { true, 0, 5 }, // front - .rsm_efuse = { true, 0, 5 }, // rsm - .bms_efuse = { true, 0, 5 }, // bms - .dam_efuse = { true, 0, 5 }, // dam - .f_inv_efuse = { true, 200, 5 }, // f_inv - .r_inv_efuse = { true, 200, 5 }, // r_inv - .r_rad_fan_efuse = { true, 200, 5 }, // r_rad_fan - .l_rad_fan_efuse = { true, 200, 5 }, // l_rad_fan + .front_efuse = { true, 0, 5 }, // front + .rsm_efuse = { true, 0, 5 }, // rsm + .bms_efuse = { true, 0, 5 }, // bms + .dam_efuse = { true, 0, 5 }, // dam + .f_inv_efuse = { true, 200, 5 }, // f_inv + .r_inv_efuse = { true, 200, 5 }, // r_inv + .r_rad_fan_efuse = { true, 200, 5 }, // r_rad_fan + .l_rad_fan_efuse = { true, 200, 5 }, // l_rad_fan .rr_pump_efuse = { true, 200, 5 }, // rr_pump .rl_pump_efuse = { true, 200, 5 }, // rl_pump }; diff --git a/firmware/hexray/VC/src/tasks.cpp b/firmware/hexray/VC/src/tasks.cpp index 5180f5c73c..7d9d268789 100644 --- a/firmware/hexray/VC/src/tasks.cpp +++ b/firmware/hexray/VC/src/tasks.cpp @@ -255,13 +255,13 @@ static void VC_StartAllTasks() Task100Hz.start(); Task1kHz.start(); Task1Hz.start(); - // TaskImu.start(); + TaskImu.start(); TaskCanRx.start(); TaskCan1Tx.start(); TaskCan2Tx.start(); // TaskBatteryMonitoring.start(); TaskPowerMonitoring.start(); - // TaskSbgEllipse.start(); + TaskSbgEllipse.start(); } void tasks_preInit() From 893da4be0f16713daec37ad03c87afcc0118a214 Mon Sep 17 00:00:00 2001 From: Rijwal Sangey Date: Tue, 14 Jul 2026 01:02:49 -0700 Subject: [PATCH 3/4] done --- firmware/hexray/PCM/src/cubemx/PCM.ioc | 4 +++- firmware/hexray/PCM/src/cubemx/PCM.ioc.md5 | 2 +- firmware/hexray/PCM/src/cubemx/Src/main.c | 2 +- firmware/hexray/PCM/src/tasks.cpp | 17 +++++++++++++---- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/firmware/hexray/PCM/src/cubemx/PCM.ioc b/firmware/hexray/PCM/src/cubemx/PCM.ioc index 73558d9f23..1bad0fe90b 100644 --- a/firmware/hexray/PCM/src/cubemx/PCM.ioc +++ b/firmware/hexray/PCM/src/cubemx/PCM.ioc @@ -62,8 +62,10 @@ PB3.GPIO_Label=SWO PB3.Locked=true PB3.Mode=Trace_Asynchronous_SW PB3.Signal=SYS_JTDO-SWO -PB5.GPIOParameters=GPIO_Label +PB5.GPIOParameters=GPIO_Label,GPIO_ITMode,GPIO_ModeDefaultEXTI +PB5.GPIO_ITMode=Interrupt_Rising_Falling_Edge PB5.GPIO_Label=PCM_EN +PB5.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING_FALLING PB5.Locked=true PB5.Signal=GPXTI5 PB6.GPIOParameters=GPIO_Label diff --git a/firmware/hexray/PCM/src/cubemx/PCM.ioc.md5 b/firmware/hexray/PCM/src/cubemx/PCM.ioc.md5 index f57a2faf26..941f77b567 100644 --- a/firmware/hexray/PCM/src/cubemx/PCM.ioc.md5 +++ b/firmware/hexray/PCM/src/cubemx/PCM.ioc.md5 @@ -1 +1 @@ -8b15e3c5bb0920d84cde3bc61402d5e6 \ No newline at end of file +6c152407cb5a0d57cb1ccdd44010ea4c \ No newline at end of file diff --git a/firmware/hexray/PCM/src/cubemx/Src/main.c b/firmware/hexray/PCM/src/cubemx/Src/main.c index e778efa4bc..ff3086cd96 100644 --- a/firmware/hexray/PCM/src/cubemx/Src/main.c +++ b/firmware/hexray/PCM/src/cubemx/Src/main.c @@ -220,7 +220,7 @@ static void MX_GPIO_Init(void) /*Configure GPIO pin : PCM_EN_Pin */ GPIO_InitStruct.Pin = PCM_EN_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; + GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING_FALLING; GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(PCM_EN_GPIO_Port, &GPIO_InitStruct); diff --git a/firmware/hexray/PCM/src/tasks.cpp b/firmware/hexray/PCM/src/tasks.cpp index 0812155fc0..40559d9579 100644 --- a/firmware/hexray/PCM/src/tasks.cpp +++ b/firmware/hexray/PCM/src/tasks.cpp @@ -33,12 +33,21 @@ static const hw::gpio pcm_en_in{ PCM_EN_GPIO_Port, PCM_EN_Pin }; static const hw::gpio lv_buck_en_out{ LV_BUCK_EN_GPIO_Port, LV_BUCK_EN_Pin }; static const hw::gpio led_out{ LED_GPIO_Port, LED_Pin }; -static auto state = PcmState::OFF; +static auto state = PcmState::OFF; +static volatile bool pcm_en_state = false; #ifdef PCM_DEBUG static char debug_buf[1024]; #endif +void HAL_GPIO_EXTI_Callback(const uint16_t GPIO_Pin) +{ + if (GPIO_Pin == pcm_en_in.getPin()) + { + pcm_en_state = pcm_en_in.readPin(); + } +} + [[noreturn]] static void tasks_tick(void *arg) { forever @@ -143,7 +152,7 @@ static char debug_buf[1024]; { case PcmState::OFF: { - if (pcm_en_in.readPin()) + if (pcm_en_state) { LOG_INFO("trying to clear faults and turn on"); if (vicor::clearFaults().has_value() and vicor::operation(true).has_value()) @@ -161,7 +170,7 @@ static char debug_buf[1024]; } case PcmState::VICOR_ONLY: { - if (not pcm_en_in.readPin() and vicor::operation(false).has_value()) + if (not pcm_en_state and vicor::operation(false).has_value()) { LOG_INFO("Going to OFF state"); state = PcmState::OFF; @@ -181,7 +190,7 @@ static char debug_buf[1024]; } case PcmState::ON: // everything on { - if (not pcm_en_in.readPin()) + if (not pcm_en_state) { lv_buck_en_out.writePin(false); From 80727f7afc0f8b325000d1c9c28982c74dc44e13 Mon Sep 17 00:00:00 2001 From: Rijwal Sangey Date: Sun, 23 Aug 2026 19:28:51 -0600 Subject: [PATCH 4/4] bruh --- .vscode/launch.json | 354 -------------------------------------------- .vscode/tasks.json | 125 ---------------- 2 files changed, 479 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 652fbfc7cc..1d27421504 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -11,22 +11,6 @@ ], "console": "integratedTerminal" }, - { - "name": "Debug JSON CAN (module)", - "type": "python", - "request": "launch", - "module": "scripts.code_generation.jsoncan.generate_can_from_json", - "args": [ - "--board", - "VC", - "--can_data_dir", - "${workspaceFolder}/can_bus/quintuna", - "--output_dir", - "temp", - "--dbc_output", - ], - "console": "integratedTerminal" - }, // ========== HEXRAY CHIMERA ========== { "name": "Debug Chimera: VC (Hexray)", @@ -565,301 +549,6 @@ ] } }, - // ========== QUINTUNA BOARDS (remove) ========== - { - "name": "Debug Embedded: VC (Quintuna)", - "cwd": "${workspaceRoot}", - "executable": "build_fw_dev/firmware/quintuna/VC/quintuna_VC.hex", - "symbolFiles": [ - // This order matters, or RTT won't work! (app has to be last) - "build_fw_dev/firmware/quintuna/VC/quintuna_VC_boot.elf", - "build_fw_dev/firmware/quintuna/VC/quintuna_VC_app.elf" - ], - "preLaunchTask": "Build Embedded: VC (Quintuna)", - // cortex configurations - "request": "launch", - "type": "cortex-debug", - "servertype": "jlink", - "linux": { - "serverpath": "JLinkGDBServerCLExe" - }, - "osx": { - "serverpath": "JLinkGDBServer" - }, - "windows": { - "serverpath": "JLinkGDBServerCL" - }, - "serverArgs": [ - "-speed", - "4000" - ], - "device": "STM32H733VG", - "interface": "swd", - "showDevDebugOutput": "none", - "rttConfig": { - "enabled": true, - "address": "auto", - "decoders": [ - { - "label": "Debug logs: VC", - "port": 0, - "type": "console" - } - ] - } - }, - { - "name": "Debug Embedded: DAM (Quintuna)", - "cwd": "${workspaceRoot}", - "executable": "build_fw_dev/firmware/quintuna/DAM/quintuna_DAM.hex", - "symbolFiles": [ - // This order matters, or RTT won't work! (app has to be last) - "build_fw_dev/firmware/quintuna/DAM/quintuna_DAM_boot.elf", - "build_fw_dev/firmware/quintuna/DAM/quintuna_DAM_app.elf", - ], - "preLaunchTask": "Build Embedded: DAM (Quintuna)", - // cortex configurations - "request": "launch", - "type": "cortex-debug", - "servertype": "jlink", - "linux": { - "serverpath": "JLinkGDBServerCLExe" - }, - "osx": { - "serverpath": "JLinkGDBServer" - }, - "windows": { - "serverpath": "JLinkGDBServerCL" - }, - "serverArgs": [ - "-speed", - "4000" - ], - "device": "STM32H733VG", - "interface": "swd", - "showDevDebugOutput": "none", - "rttConfig": { - "enabled": true, - "address": "auto", - "decoders": [ - { - "label": "Debug logs: DAM", - "port": 0, - "type": "console" - } - ] - } - }, - { - "name": "Debug Embedded: FSM (Quintuna)", - "cwd": "${workspaceRoot}", - "executable": "build_fw_dev/firmware/quintuna/FSM/quintuna_FSM.hex", - "symbolFiles": [ - // This order matters, or RTT won't work! (app has to be last) - "build_fw_dev/firmware/quintuna/FSM/quintuna_FSM_boot.elf", - "build_fw_dev/firmware/quintuna/FSM/quintuna_FSM_app.elf" - ], - "preLaunchTask": "Build Embedded: FSM (Quintuna)", - // cortex configurations - "request": "launch", - "type": "cortex-debug", - "servertype": "jlink", - "linux": { - "serverpath": "JLinkGDBServerCLExe" - }, - "osx": { - "serverpath": "JLinkGDBServer" - }, - "windows": { - "serverpath": "JLinkGDBServerCL" - }, - "serverArgs": [ - "-speed", - "4000" - ], - "device": "STM32F412RG", - "interface": "swd", - "showDevDebugOutput": "none", - "rttConfig": { - "enabled": true, - "address": "auto", - "decoders": [ - { - "label": "Debug logs: FSM", - "port": 0, - "type": "console" - } - ] - } - }, - { - "name": "Debug Embedded: RSM (Quintuna)", - "cwd": "${workspaceRoot}", - "executable": "build_fw_dev/firmware/quintuna/RSM/quintuna_RSM.hex", - "symbolFiles": [ - // This order matters, or RTT won't work! (app has to be last) - "build_fw_dev/firmware/quintuna/RSM/quintuna_RSM_boot.elf", - "build_fw_dev/firmware/quintuna/RSM/quintuna_RSM_app.elf" - ], - "preLaunchTask": "Build Embedded: RSM (Quintuna)", - // cortex configurations - "request": "launch", - "type": "cortex-debug", - "servertype": "jlink", - "linux": { - "serverpath": "JLinkGDBServerCLExe" - }, - "osx": { - "serverpath": "JLinkGDBServer" - }, - "windows": { - "serverpath": "JLinkGDBServerCL" - }, - "serverArgs": [ - "-speed", - "4000" - ], - "device": "STM32F412RG", - "interface": "swd", - "showDevDebugOutput": "none", - "rttConfig": { - "enabled": true, - "address": "auto", - "decoders": [ - { - "label": "Debug logs: RSM", - "port": 0, - "type": "console" - } - ] - } - }, - { - "name": "Debug Embedded: CRIT (Quintuna)", - "cwd": "${workspaceRoot}", - // binary config - "executable": "build_fw_dev/firmware/quintuna/CRIT/quintuna_CRIT.hex", - "symbolFiles": [ - // This order matters, or RTT won't work! (app has to be last) - "build_fw_dev/firmware/quintuna/CRIT/quintuna_CRIT_boot.elf", - "build_fw_dev/firmware/quintuna/CRIT/quintuna_CRIT_app.elf" - ], - "preLaunchTask": "Build Embedded: CRIT (Quintuna)", - // cortex configurations - "request": "launch", - "type": "cortex-debug", - "servertype": "jlink", - "linux": { - "serverpath": "JLinkGDBServerCLExe" - }, - "osx": { - "serverpath": "JLinkGDBServer" - }, - "windows": { - "serverpath": "JLinkGDBServerCL" - }, - "serverArgs": [ - "-speed", - "4000" - ], - "device": "STM32F412RG", - "interface": "swd", - "showDevDebugOutput": "none", - "rttConfig": { - "enabled": true, - "address": "auto", - "decoders": [ - { - "label": "Debug logs: CRIT", - "port": 0, - "type": "console" - } - ] - } - }, - { - "name": "Debug Embedded: BMS (Quintuna)", - "cwd": "${workspaceRoot}", - "executable": "build_fw_dev/firmware/quintuna/BMS/quintuna_BMS.hex", - "symbolFiles": [ - // This order matters, or RTT won't work! (app has to be last) - "build_fw_dev/firmware/quintuna/BMS/quintuna_BMS_boot.elf", - "build_fw_dev/firmware/quintuna/BMS/quintuna_BMS_app.elf" - ], - "preLaunchTask": "Build Embedded: BMS (Quintuna)", - // cortex configurations - "request": "launch", - "type": "cortex-debug", - "servertype": "jlink", - "linux": { - "serverpath": "JLinkGDBServerCLExe" - }, - "osx": { - "serverpath": "JLinkGDBServer" - }, - "windows": { - "serverpath": "JLinkGDBServerCL" - }, - "serverArgs": [ - "-speed", - "4000" - ], - "device": "STM32H733VG", - "interface": "swd", - "showDevDebugOutput": "none", - "rttConfig": { - "enabled": true, - "address": "auto", - "decoders": [ - { - "label": "Debug logs: BMS", - "port": 0, - "type": "console" - } - ] - } - }, - { - "name": "Debug Embedded: SSM", - "cwd": "${workspaceRoot}", - // binary config - "executable": "build_fw_dev/firmware/dev/SSM/ssm.elf", - "symbolFiles": [ - "build_fw_dev/firmware/dev/SSM/ssm.elf" - ], - "preLaunchTask": "Build Embedded: SSM", - // cortex configurations - "request": "launch", - "type": "cortex-debug", - "servertype": "jlink", - "linux": { - "serverpath": "JLinkGDBServerCLExe" - }, - "osx": { - "serverpath": "JLinkGDBServer" - }, - "windows": { - "serverpath": "JLinkGDBServerCL" - }, - "serverArgs": [ - "-speed", - "4000" - ], - "device": "STM32F412RG", - "interface": "swd", - "showDevDebugOutput": "none", - "rttConfig": { - "enabled": true, - "address": "auto", - "decoders": [ - { - "label": "Debug logs: SSM", - "port": 0, - "type": "console" - } - ] - } - }, // ========== DEV BOARDS ========== { "name": "Debug Embedded: h7dev", @@ -944,48 +633,6 @@ } }, // ========== TESTS ========== - { - "name": "Debug Tests: VC (Quintuna)", - "type": "cppdbg", - "request": "launch", - "program": "${workspaceRoot}/build_fw_test/firmware/quintuna/VC/quintuna_VC_test", - "cwd": "${workspaceRoot}", - "preLaunchTask": "Build Tests: VC (Quintuna)", - "linux": { - "MIMode": "gdb" - }, - "osx": { - "MIMode": "lldb" - } - }, - { - "name": "Debug Tests: CRIT (Quintuna)", - "type": "cppdbg", - "request": "launch", - "program": "${workspaceRoot}/build_fw_test/firmware/quintuna/CRIT/quintuna_CRIT_test", - "cwd": "${workspaceRoot}", - "preLaunchTask": "Build Tests: CRIT (Quintuna)", - "linux": { - "MIMode": "gdb" - }, - "osx": { - "MIMode": "lldb" - } - }, - { - "name": "Debug Tests: BMS (Quintuna)", - "type": "cppdbg", - "request": "launch", - "program": "${workspaceRoot}/build_fw_test/firmware/quintuna/BMS/quintuna_BMS_test", - "cwd": "${workspaceRoot}", - // "preLaunchTask": "Build Tests: BMS (Quintuna)", - "linux": { - "MIMode": "gdb" - }, - "osx": { - "MIMode": "lldb" - } - }, { "name": "Debug Tests: BMS (Hexray)", "type": "cppdbg", @@ -1098,7 +745,6 @@ "MIMode": "lldb" } }, - // ======================== { "name": "Debug Tests: JSON CAN intergation", "type": "cppdbg", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index a903fcf6f0..4aa1a77144 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -32,22 +32,6 @@ "command": "configure", "preset": "${command:cmake.activeConfigurePresetName}" }, - { - "label": "Build Embedded Quintuna", - "detail": "CMake Generate step", - "group": "build", - "type": "cmake", - "command": "build", - "targets": [ - "quintuna_BMS.hex", - "quintuna_VC.hex", - "quintuna_CRIT.hex", - "quintuna_RSM.hex", - "quintuna_FSM.hex", - "quintuna_DAM.hex", - "can_bus_load_quintuna" - ] - }, { "label": "Build Embedded Hexray", "detail": "CMake Generate step", @@ -69,79 +53,6 @@ "command": "clean", "preset": "${command:cmake.activeBuildPresetName}" }, - { - "label": "Build Embedded: VCR (Quintuna)", - "group": "build", - "type": "cmake", - "command": "build", - "targets": [ - "quintuna_VCR_app.elf", - ] - }, - { - "label": "Build Embedded: BMS (Quintuna)", - "group": "build", - "type": "cmake", - "command": "build", - "targets": [ - "quintuna_BMS.hex", - ] - }, - { - "label": "Run Tests: BMS (Quintuna)", - "type": "shell", - "command": "${workspaceFolder}/build_fw_test/firmware/quintuna/BMS/quintuna_BMS_test", - "group": "test", - "presentation": { - "reveal": "always" - }, - "problemMatcher": [] - }, - { - "label": "Build Embedded: VC (Quintuna)", - "group": "build", - "type": "cmake", - "command": "build", - "targets": [ - "quintuna_VC.hex", - ] - }, - { - "label": "Build Embedded: CRIT (Quintuna)", - "group": "build", - "type": "cmake", - "command": "build", - "targets": [ - "quintuna_CRIT.hex", - ] - }, - { - "label": "Build Embedded: DAM (Quintuna)", - "group": "build", - "type": "cmake", - "command": "build", - "targets": [ - "quintuna_DAM.hex", - ] - }, - { - "label": "Build Embedded: RSM (Quintuna)", - "group": "build", - "type": "cmake", - "command": "build", - "targets": [ - "quintuna_RSM.hex", - ] - }, - { - "label": "Build Embedded: FSM (Quintuna)", - "group": "build", - "type": "cmake", - "command": "build", - "targets": [ - "quintuna_FSM.hex", - ] - }, { "label": "Build Embedded: h7dev", "group": "build", @@ -169,33 +80,6 @@ "ssm.hex" ] }, - { - "label": "Build Tests: CRIT (Quintuna)", - "group": "build", - "type": "cmake", - "command": "build", - "targets": [ - "quintuna_CRIT_test" - ] - }, - { - "label": "Build Tests: VC (Quintuna)", - "group": "build", - "type": "cmake", - "command": "build", - "targets": [ - "quintuna_VC_test" - ] - }, - { - "label": "Build Tests: BMS (Quintuna)", - "group": "build", - "type": "cmake", - "command": "build", - "targets": [ - "quintuna_BMS_test" - ] - }, { "label": "Build Embedded: BMS (Hexray)", "group": "build", @@ -386,15 +270,6 @@ "jsoncan_test" ] }, - { - "label": "CAN Bus Load: Quintuna", - "group": "build", - "type": "cmake", - "command": "build", - "targets": [ - "can_bus_load_quintuna" - ] - }, { "label": "Run Telem Backend", "type": "shell",