Skip to content

Conversation

@kryptoish
Copy link
Contributor

@kryptoish kryptoish commented Oct 23, 2025

Changelist

  • Just made it an option where if you want it will build chimera otherwise just dev
  • I may be missing some small changes to the other cmake presets pls check
  • Also I didn't make anything for wsl builds I saw that in the .gitignore but I ignored it.

Testing Done

  • uuuhhh if you use the FW Dev then it builds for the car in dir: build_fw_dev
  • If you set FW Chimera then it builds the full ting in dir: build_fw_chimera

Resolved Tickets

FIRM-540

@kryptoish kryptoish requested a review from Lucien950 October 23, 2025 05:43
@kryptoish kryptoish self-assigned this Oct 23, 2025
@kryptoish kryptoish added the Build System/DevEx Anything that affects Build System, IDE Integration, Github Actions, Code Deployment label Oct 23, 2025
Comment on lines 40 to 44
IF ("${FIRMWARE_TARGET}" STREQUAL "chimera")
# add_subdirectory(chimera) /* need this? */
add_subdirectory(chimera_v2)
add_subdirectory(dev)
ELSE ()
add_subdirectory(dev)
ENDIF ()
Copy link
Contributor

Choose a reason for hiding this comment

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

You can move this up the the initial If (target binary) condition. I don't think you need to have dev in here as well. You do not the chimera only chimera_v2.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also may wan to add a compile definition for chimera, I know in the past we had issues with the hw_chimera_v2_enabled and replace those in tasks.c

"FIRMWARE_TARGET": "chimera",
"USE_COMMIT_INFO": "ON",
"BOOTLOAD": "ON",
"WATCHDOG": "ON"
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want watchdog on for chimera?

Copy link
Contributor

Choose a reason for hiding this comment

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

I would say let's turn bootloader and watchdog off

# add_subdirectory(chimera)
add_subdirectory(chimera_v2)
IF ("${FIRMWARE_TARGET}" STREQUAL "chimera")
# add_subdirectory(chimera) /* need this? */
Copy link
Contributor

Choose a reason for hiding this comment

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

no

@kryptoish
Copy link
Contributor Author

on everyone's soul i have no idea why it builds on github and not on my computer but ion care.

@kryptoish kryptoish force-pushed the cmake_chimera_segregation branch from 675f50b to 124d474 Compare November 17, 2025 05:52
@Lucien950
Copy link
Contributor

@kryptoish don't put that on my soul

@Lucien950
Copy link
Contributor

also update ur arm i think we're on latest now

Copy link
Contributor

@Lucien950 Lucien950 left a comment

Choose a reason for hiding this comment

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

added comments onto VC, applies to all boards

Copy link
Contributor

Choose a reason for hiding this comment

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

why not create a whole new chimera_tasks.c?

set(IO_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src/io" "${SHARED_IO_INCLUDE_DIR}" "${SHARED_IO_INCLUDE_QUINTUNA_DIR}")

file(GLOB_RECURSE HW_SRCS CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/hw/*.c")
list(FILTER HW_SRCS EXCLUDE REGEX ".*/hw_chimeraConfig_v2\\.c$")
Copy link
Contributor

Choose a reason for hiding this comment

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

i feel like it's a lot easier and makes more sense to just throw the chimeraConfig into chimera_tasks.c (defined previously)

"chimera_v2_proto_cm7"
m)
if ("${FIRMWARE_TARGET}" STREQUAL "chimera")
target_link_libraries("quintuna_VC_app.elf" PRIVATE "chimera_v2_proto_cm7")
Copy link
Contributor

Choose a reason for hiding this comment

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

instead of doing an optional linking, can you just make a seperate target for chimera?

# ======== Code Time ========
option(PLATFORM "The platform to build for, either \"firmware\" or \"dimos\"" "firmware")
option(TARGET "The target to build for. Choose between \"binary\" and \"test\"." "binary")
option(FIRMWARE_TARGET "The firmware target to build for. Choose between \"dev\" and \"chimera\"." "dev")
Copy link
Contributor

Choose a reason for hiding this comment

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

can we make it so that firmware builds have chimera and non-chimera targets? achieved by making seperate chimera targets

Copy link
Contributor

Choose a reason for hiding this comment

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

be very careful about this, because all this code gets destroyed on code autogen (namly all code outside of USER_CODE_BEGIN blocks are destroyed).

We will be managing our own freertos into the future, so maybe don't worry about this for now? On hexray, you can manage your freertos tasks without cubemx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build System/DevEx Anything that affects Build System, IDE Integration, Github Actions, Code Deployment

Development

Successfully merging this pull request may close these issues.

5 participants