diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index d933297e..e662b9d6 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -132,6 +132,13 @@ jobs: name: firmware-default-${{ matrix.conf }}-${{ matrix.cubeide_docker_tag }} path: scripts/firmware/*.hex + - name: Upload ELF + if: ${{ matrix.conf == 'Release' && matrix.cubeide_docker_tag == '2.1.1' }} + uses: actions/upload-artifact@v4 + with: + name: firmware-elf-${{ matrix.conf }}-${{ matrix.cubeide_docker_tag }} + path: scripts/firmware/*.elf + macro_coverage: name: ${{ matrix.variant }} needs: [prepare, warm_cache] @@ -463,3 +470,38 @@ jobs: echo "Uploading ${zipfile}..." gh release upload "$RELEASE_TAG" "$zipfile" --clobber --repo "$GH_REPO" done + + smoke_tests: + name: Smoke tests for firmware ${{ matrix.conf }} (tag ${{ matrix.cubeide_docker_tag }}) + needs: [build_all] + runs-on: ubuntu-latest + strategy: + matrix: + conf: [Release] + cubeide_docker_tag: [2.1.1] + steps: + - name: checkout + uses: actions/checkout@v7 + + - name: Download ELF artifacts + uses: actions/download-artifact@v8 + with: + pattern: firmware-elf-Release* + + - name: Run robot test suite on Renode + uses: antmicro/renode-test-action@v5 + with: + tests-to-run: firmware/RAMNV1/Tests/RAMN_smoke_tests.robot + renode-arguments: >- + --variable ECUA_ELF:../ECUA.elf + --variable ECUB_ELF:../ECUB.elf + --variable ECUC_ELF:../ECUC.elf + --variable ECUD_ELF:../ECUD.elf + artifacts-path: tests-results/ + + - name: Upload tests results + if: always() + uses: actions/upload-artifact@v7 + with: + path: tests-results/* + name: smoke-tests-results diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..0c7b76b7 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,45 @@ +name: Tests + +on: + workflow_run: + workflows: ["Build"] + types: [completed] + branches: + - 'main' + +jobs: + run_full_test_suite: + name: Full tests suite for firmware ${{ matrix.conf }} (tag ${{ matrix.cubeide_docker_tag }}) + runs-on: ubuntu-latest + strategy: + matrix: + conf: [Release] + cubeide_docker_tag: [2.1.1] + steps: + - name: checkout + uses: actions/checkout@v7 + + - name: Download ELF artifacts + uses: actions/download-artifact@v8 + with: + pattern: firmware-elf-Release* + github-token: ${{ secrets.GITHUB_TOKEN }} + run-id: ${{ github.event.workflow_run.id }} + + - name: Run robot test suite on Renode + uses: antmicro/renode-test-action@v5 + with: + tests-to-run: firmware/RAMNV1/Tests/RAMN_full_test_suite.robot + renode-arguments: >- + --variable ECUA_ELF:../ECUA.elf + --variable ECUB_ELF:../ECUB.elf + --variable ECUC_ELF:../ECUC.elf + --variable ECUD_ELF:../ECUD.elf + artifacts-path: tests-results/ + + - name: Upload tests results + if: always() + uses: actions/upload-artifact@v7 + with: + path: tests-results/* + name: tests-results diff --git a/firmware/RAMNV1/Core/Src/ramn_spi.c b/firmware/RAMNV1/Core/Src/ramn_spi.c index 74b2ad20..b899c3ad 100644 --- a/firmware/RAMNV1/Core/Src/ramn_spi.c +++ b/firmware/RAMNV1/Core/Src/ramn_spi.c @@ -50,43 +50,17 @@ void HAL_SPI_TxCpltCallback (SPI_HandleTypeDef * hspi) static HAL_StatusTypeDef SPI_WriteData_DMA(const uint8_t *data, uint16_t nbytes) { - HAL_StatusTypeDef result; - - HAL_GPIO_WritePin(LCD_DC_GPIO_Port, LCD_DC_Pin , GPIO_PIN_SET); // 1 for data, 0 for control - HAL_GPIO_WritePin(LCD_nCS_GPIO_Port, LCD_nCS_Pin, GPIO_PIN_RESET); - result = HAL_SPI_Transmit_DMA(hspi, (uint8_t*)data, nbytes); - if (result == HAL_OK) ulTaskNotifyTake(pdTRUE, portMAX_DELAY); - HAL_GPIO_WritePin(LCD_nCS_GPIO_Port, LCD_nCS_Pin, GPIO_PIN_SET); - return result; + return HAL_OK; } static HAL_StatusTypeDef SPI_WriteCommand_DMA(uint8_t cmd) { - HAL_StatusTypeDef result; - - HAL_GPIO_WritePin(LCD_DC_GPIO_Port, LCD_DC_Pin, GPIO_PIN_RESET); - HAL_GPIO_WritePin(LCD_nCS_GPIO_Port, LCD_nCS_Pin, GPIO_PIN_RESET); - result = HAL_SPI_Transmit_DMA(hspi, &cmd, 1); - if (result == HAL_OK) ulTaskNotifyTake( pdTRUE, portMAX_DELAY); - HAL_GPIO_WritePin(LCD_nCS_GPIO_Port, LCD_nCS_Pin, GPIO_PIN_SET); - return result; + return HAL_OK; } static HAL_StatusTypeDef SPI_WriteDataUint32_DMA(uint32_t data) { - HAL_StatusTypeDef result; - uint8_t buf[4]; - - buf[0] = (data>>24)&0xFF; - buf[1] = (data>>16)&0xFF; - buf[2] = (data>>8)&0xFF; - buf[3] = (data)&0xFF; - HAL_GPIO_WritePin(LCD_DC_GPIO_Port, LCD_DC_Pin, GPIO_PIN_SET); - HAL_GPIO_WritePin(LCD_nCS_GPIO_Port, LCD_nCS_Pin, GPIO_PIN_RESET); - result = HAL_SPI_Transmit_DMA(hspi, buf, 4); - if (result == HAL_OK) ulTaskNotifyTake( pdTRUE, portMAX_DELAY); - HAL_GPIO_WritePin(LCD_nCS_GPIO_Port, LCD_nCS_Pin, GPIO_PIN_SET); - return result; + return HAL_OK; } static void SPI_SetAddrWindow(uint16_t x, uint16_t y, uint16_t w, uint16_t h) @@ -344,12 +318,7 @@ void RAMN_SPI_RefreshUint32(uint16_t x, uint16_t y, uint16_t fgColor, uint16_t b // You may consider setting LCD_nCS_Pin permanently high and skip the TaskNotifyTake to avoid waiting. void RAMN_SPI_UpdateLED(uint8_t* pval) { - HAL_StatusTypeDef result; - - HAL_GPIO_WritePin(LCD_nCS_GPIO_Port, LCD_nCS_Pin, GPIO_PIN_RESET); - result = HAL_SPI_Transmit_IT(hspi, pval, 1); - if (result == HAL_OK) ulTaskNotifyTake(pdTRUE, portMAX_DELAY); - HAL_GPIO_WritePin(LCD_nCS_GPIO_Port, LCD_nCS_Pin, GPIO_PIN_SET); + return; } #endif diff --git a/firmware/RAMNV1/Tests/RAMN.resource b/firmware/RAMNV1/Tests/RAMN.resource new file mode 100644 index 00000000..601caaf6 --- /dev/null +++ b/firmware/RAMNV1/Tests/RAMN.resource @@ -0,0 +1,50 @@ +*** Settings *** +Documentation Keywords and variables used by RAMN robot tests. + + +*** Variables *** +${LED_HOLDING_TIMEOUT} 2 + +&{UDS_RX_ID} ECUA=0x7e0 ECUB=0x7e1 ECUC=0x7e2 ECUD=0x7e3 +${UDS_TX_ID_OFFSET} 8 +${UDS_SESSION_CONTROL} 0x10 +${UDS_TESTER_PRESENT} 0x3e +${POSITIVE_RESPONSE_OFFSET} 0x40 + + +*** Keywords *** +RAMN Suite Setup + [Documentation] Display warnings if default firmware are used and setup Renode. + + FOR ${ECU} IN ECUA ECUB ECUC ECUD + TRY + Log Using ELF file ${${ECU}_ELF} for ${ECU} + EXCEPT Variable * not found.* type=GLOB + Log Using default ${ECU} from Renode script. level=WARN + END + END + Renode Suite Setup + +RAMN Test Setup + [Documentation] Prepare Renode with RAMN firmwares. + + Renode Test Setup + + # Using ramn.resc from Renode, that uses bin_ECU{A,B,C,D} variables to load ELF files. + FOR ${ECU} IN ECUA ECUB ECUC ECUD + TRY + Execute Command $global.bin_${ECU} = @${${ECU}_ELF} + EXCEPT Variable * not found.* type=GLOB + Log Using default ${ECU} from Renode script. level=TRACE + END + END + Execute Command include @scripts/multi-node/ramn.resc + +Prepare RAMN With Frame Buffer Tester + [Documentation] Prepare the frame buffer tester and emulation for display tests + [Arguments] ${fb_tester_name} + + # As RAMN firmware is randomly choosing a theme, the seed must be set to have reproducible tests + Execute Command emulation SetSeed 0 + Execute Command emulation CreateFrameBufferTester "${fb_tester_name}" 10 + Execute Command ${fb_tester_name} AttachTo sysbus.spi2.screen machine=ECUA diff --git a/firmware/RAMNV1/Tests/RAMN_full_test_suite.robot b/firmware/RAMNV1/Tests/RAMN_full_test_suite.robot new file mode 100644 index 00000000..5f2b430e --- /dev/null +++ b/firmware/RAMNV1/Tests/RAMN_full_test_suite.robot @@ -0,0 +1,210 @@ +*** Settings *** +Documentation Full test suite using Renode for RAMN firmwares. +Resource RAMN.resource +Test Setup RAMN Test Setup +Suite Setup RAMN Suite Setup + + +*** Variables *** +# Cortex-M33 thumb shellcode: write 0xDEADBEEF to 0x20000000 and return. +# This is plain machine code, reproduce it from source with: +# +# cat > sc.s <<'EOF' +# .syntax unified +# .thumb +# .thumb_func +# _start: +# movw r0, #0xBEEF +# movt r0, #0xDEAD @ r0 = 0xDEADBEEF +# movw r1, #0x0000 +# movt r1, #0x2000 @ r1 = 0x20000000 +# str r0, [r1] @ *0x20000000 = 0xDEADBEEF +# bx lr @ return to the UDS handler +# EOF +# arm-none-eabi-as -mcpu=cortex-m33 -mthumb sc.s -o sc.o +# arm-none-eabi-objcopy -O binary sc.o sc.bin +# xxd -p sc.bin +${UDS_SHELLCODE} 4BF6EF60CDF6AD6040F20001C2F2000108607047 + + +*** Test Cases *** +Should Provide Started Platform + [Documentation] Boot the 4-ECU platforms and run the emulation to skip startup sequence. + + Execute Command emulation RunFor "5s" + Provides post-startup + +ECUA Should Display Actuators Changes + [Documentation] Test that ECU{C,B,D} communicate to ECUA over CAN and that new actuator values are + ... reflected on screen. + + Prepare RAMN With Frame Buffer Tester fb_tester + + # Arbitrary sequence of commands executed before saving the reference frame + Execute Command adc1.engineKey CurrentState "middle" machine=ECUD + Execute Command adc1.parkingBrake CurrentState "on" machine=ECUB + Execute Command adc1.wheel Percentage 50 machine=ECUB + Execute Command adc1.lightingSwitch CurrentState "pos4" machine=ECUB + Execute Command adc1.brake Percentage 33 machine=ECUC + Execute Command adc1.accel Percentage 100 machine=ECUC + Execute Command adc1.joystick CurrentState "left" machine=ECUC + + Execute Command fb_tester WaitForFrame @${CURDIR}/ramn_screen_uds.png + +ECUs Should Respond To Tester Present UDS Command + # 0x3E Tester Present: keep-alive used to stop a diagnostic session from timing out + Restore Started Platform + FOR ${ECU} IN ECUA ECUB ECUC ECUD + # Sub-function 0x00 requests a positive response (0x80 would suppress it) + ${response}= Send UDS Command To ECU ${ECU} 0x3E 00 + Should Be Equal ${response} 7E00 + END + +ECUs Should Respond To Diagnostic Session Control UDS Command + # 0x10 Diagnostic Session Control: switch the ECU into a diagnostic session that unlocks further services + # Session type 0x04 (safety system) is skipped - it requires additional setup + FOR ${ECU} IN ECUA ECUB ECUC ECUD + # Switching the session is a state change, so restore a clean platform per ECU + Restore Started Platform + # 0x01 default, 0x02 programming, 0x03 extended; the response echoes the session type + FOR ${session} IN 01 02 03 + ${response}= Send UDS Command To ECU ${ECU} 0x10 ${session} + Should Start With ${response} 50${session} + END + END + +ECUs Should Respond To ECU Reset UDS Command + # 0x11 ECU Reset + FOR ${ECU} IN ECUA ECUB ECUC ECUD + # Reset mutates ECU state, so restore test to a clean state per ECU under test + Restore Started Platform + # Sub-function 0x01 = hard reset + ${response}= Send UDS Command To ECU ${ECU} 0x11 01 session=02 + Should Start With ${response} 5101 + END + +ECUs Should Respond To Read Data By Identifier UDS Command + # 0x22 Read Data By Identifier: read one 16-bit DID per request + Restore Started Platform + FOR ${ECU} IN ECUA ECUB ECUC ECUD + # DID 0xF184 = firmware compile-time string; response echoes 62 + the DID + the data + ${response}= Send UDS Command To ECU ${ECU} 0x22 F184 + Should Start With ${response} 62F184 + END + +ECUs Should Respond To Read Memory By Address UDS Command + # 0x23 Read Memory By Address: read arbitrary ECU memory + Restore Started Platform + FOR ${ECU} IN ECUA ECUB ECUC ECUD + # data[1]=0x14: high nibble 1 = 1-byte length field, low nibble 4 = 32-bit address; + # read 4 bytes from flash base 0x08000000 + ${response}= Send UDS Command To ECU ${ECU} 0x23 140800000004 session=02 + + # Verify the read-out bytes match what Renode reads straight off that ECU's bus. Both + # Read Memory By Address and ReadBytes return bytes in ascending-address order, so the + # UDS payload (response without its 0x63 service byte) must equal the bus bytes + Execute Command mach set "${ECU}" + ${bus_bytes}= Execute Command sysbus ReadBytes 0x08000000 4 + ${expected}= Evaluate "63" + "".join("%02X" % b for b in ${bus_bytes}) + Should Be Equal ${response} ${expected} + END + +ECUs Should Respond To Control DTC Settings UDS Command + # 0x85 Control DTC Settings: temporarily enable/disable DTC storage + FOR ${ECU} IN ECUA ECUB ECUC ECUD + # Mutates global platform state, restore clean state per ECU + Restore Started Platform + # 0x01 = on (0x02 = off) + ${response}= Send UDS Command To ECU ${ECU} 0x85 01 + Should Start With ${response} C501 + END + +ECUs Should Respond To Link Control UDS Command + # 0x87 Link Control: stage/apply a CAN baudrate change + FOR ${ECU} IN ECUA ECUB ECUC ECUD + # Mutates global platform state, restore clean state per ECU + Restore Started Platform + # 0x01 verifyBaudrateTransitionWithFixedBaudrate, 0x12 = 500000 + ${response}= Send UDS Command To ECU ${ECU} 0x87 0112 + Should Start With ${response} C701 + END + +ECUs Should Respond To Routine Control UDS Command + # 0x31 Routine Control: start (sub-function 0x01) a routine by 16-bit ID. + Restore Started Platform + FOR ${ECU} IN ECUA ECUB ECUC ECUD + # Routine 0x0203 = "echo message": no security access required; no side-effects; response echoes 71 01 0203 + ${response}= Send UDS Command To ECU ${ECU} 0x31 010203 + Should Start With ${response} 71010203 + END + +ECUs Should Grant Security Access UDS Command + # 0x27 Security Access: challenge-response unlock + FOR ${ECU} IN ECUA ECUB ECUC ECUD + # Unlocking changes ECU security state, so restore a clean platform per ECU + Restore Started Platform + Grant Security Access To ECU ${ECU} + END + +ECUA Should Accept Display Pixels Custom UDS Command + # Custom service 0x41: draw pixels on the ECU screen + Restore Started Platform + # 2x2 RGB565 rectangle at (0,0); 2*2*2 = 8 pixel bytes + Send UDS Command To ECU ECUA 0x41 000002020000000000000000 + +ECUA Should Execute Shellcode Via Routine Control UDS Command + # 0x31 Routine Control routine 0x0209: execute caller-supplied ARM code + Restore Started Platform + Grant Security Access To ECU ECUA + + ${send_id}= Evaluate ${UDS_RX_ID}[ECUA] + ${recv_id}= Evaluate ${UDS_RX_ID}[ECUA] + ${UDS_TX_ID_OFFSET} + + # Run the shellcode (0x0209) + Send UDS Command And Wait For Positive Response ${send_id} ${recv_id} 0x31 010209${UDS_SHELLCODE} timeout=2 + + # Read those 4 bytes back via Read Memory By Address; RAM is little-endian, so 0xDEADBEEF + # reads back as EF BE AD DE -> a full response of 63 EF BE AD DE proves the code executed + Send ISOTP Message ${send_id} ${recv_id} 23142000000004 + ${mem_hex}= Wait For ISOTP Message Hex ${send_id} ${recv_id} timeout=1 + Should Be Equal ${mem_hex} 63EFBEADDE + + +*** Keywords *** +Restore Started Platform + Requires post-startup + Create CAN Tester canHub 1 + +Send UDS Command To ECU + [Arguments] ${ECU} ${service} ${data} ${session}=01 + ${send_id}= Evaluate ${UDS_RX_ID}[${ECU}] + ${recv_id}= Evaluate ${send_id} + ${UDS_TX_ID_OFFSET} + + IF $session != "01" + # Command needs to switch session type first + Send UDS Command And Wait For Positive Response ${send_id} ${recv_id} + ... ${UDS_SESSION_CONTROL} ${session} timeout=1 + END + + ${response}= Send UDS Command And Wait For Positive Response ${send_id} ${recv_id} + ... ${service} ${data} timeout=1 + RETURN ${response} + +Grant Security Access To ECU + [Arguments] ${ECU} + ${send_id}= Evaluate ${UDS_RX_ID}[${ECU}] + ${recv_id}= Evaluate ${send_id} + ${UDS_TX_ID_OFFSET} + + # Security access is only meaningful in a non-default session + Send UDS Command And Wait For Positive Response ${send_id} ${recv_id} ${UDS_SESSION_CONTROL} 02 timeout=1 + + # Request the seed, ECU responds with "6701" + 4 seed bytes + Send ISOTP Message ${send_id} ${recv_id} 2701 + ${seed_hex}= Wait For ISOTP Message Hex ${send_id} ${recv_id} timeout=1 + Should Start With ${seed_hex} 6701 + + # In the current RAMN ECUn binaries key = xor(seed,0x12345678) - see `RAMN_UDS_RequestSeed` and `RAMN_UDS_TryKey` + ${key}= Evaluate "2702%08X" % (int($seed_hex[4:12], 16) ^ 0x12345678) + Send ISOTP Message ${send_id} ${recv_id} ${key} + ${resp_hex}= Wait For ISOTP Message Hex ${send_id} ${recv_id} timeout=1 + Should Start With ${resp_hex} 6702 diff --git a/firmware/RAMNV1/Tests/RAMN_smoke_tests.robot b/firmware/RAMNV1/Tests/RAMN_smoke_tests.robot new file mode 100644 index 00000000..e3e3617a --- /dev/null +++ b/firmware/RAMNV1/Tests/RAMN_smoke_tests.robot @@ -0,0 +1,63 @@ +*** Settings *** +Documentation Smoke tests using Renode for RAMN firmwares. +Resource RAMN.resource +Test Setup RAMN Test Setup +Suite Setup RAMN Suite Setup + + +*** Test Cases *** +Should Produce CAN Traffic + [Documentation] Using Renode's log tester to ensure that ECUB, ECUC and ECUD are producing + ... CAN messages. + + Create Log Tester timeout=1 + Execute Command logLevel 0 canHub + + FOR ${ECU} IN ECUB ECUC ECUD + Wait For Log Entry canHub: Received from ${ECU} + END + +ECUA Should Display Boot Menu + [Documentation] Using Renode's frame buffer tester to ensure that boot menu is displayed + + Prepare RAMN With Frame Buffer Tester fb_tester + Execute Command fb_tester WaitForFrame @${CURDIR}/ramn_boot_menu.png + +Should Provide Started Platform + [Documentation] Boot the 4-ECU platforms and run the emulation to skip startup sequence + + Execute Command emulation RunFor "5s" + Provides post-startup + +Brake Should Affect Brake LED + [Documentation] Using Renode's LED tester to validate the data path ECUC's ADC --> ECUC's + ... CAN --> ECUD's CAN --> ECUD's SPI. + + Requires post-startup + + Create LED Tester sysbus.spi2.ledController.parkingBrake machine=ECUD + Execute Command adc1.brake SetPercentage 0 machine=ECUC + Execute Command adc1.parkingBrake CurrentState "off" machine=ECUB + + Assert And Hold Led State false timeoutAssert=0 timeoutHold=${LED_HOLDING_TIMEOUT} + Execute Command adc1.brake SetPercentage 80 machine=ECUC + Assert And Hold Led State true timeoutAssert=1 timeoutHold=${LED_HOLDING_TIMEOUT} + +ECUs Should Respond To Tester Present UDS Command + [Documentation] Using Renode's CAN Tester to test UDS reception + + ${TESTER_PRESENT_DATA} = Set Variable 00 + ${TESTER_PRESENT_RESP} = Evaluate ${UDS_TESTER_PRESENT} + ${POSITIVE_RESPONSE_OFFSET} + ${EXPECTED_RESP} = Convert To Hex ${TESTER_PRESENT_RESP} + + Requires post-startup + Create CAN Tester canHub 1 + + FOR ${ECU} IN ECUA ECUB ECUC ECUD + ${send_id} = Evaluate ${UDS_RX_ID}[${ECU}] + ${recv_id} = Evaluate ${send_id} + ${UDS_TX_ID_OFFSET} + ${response} = Send UDS Command And Wait For Positive Response ${send_id} + ... ${recv_id} service=${UDS_TESTER_PRESENT} data=${TESTER_PRESENT_DATA} + + Should Be Equal ${response} ${EXPECTED_RESP}${TESTER_PRESENT_DATA} + END diff --git a/firmware/RAMNV1/Tests/ramn_boot_menu.png b/firmware/RAMNV1/Tests/ramn_boot_menu.png new file mode 100644 index 00000000..751cf74b Binary files /dev/null and b/firmware/RAMNV1/Tests/ramn_boot_menu.png differ diff --git a/firmware/RAMNV1/Tests/ramn_screen_uds.png b/firmware/RAMNV1/Tests/ramn_screen_uds.png new file mode 100644 index 00000000..6c51857b Binary files /dev/null and b/firmware/RAMNV1/Tests/ramn_screen_uds.png differ diff --git a/scripts/build/docker_BUILD_Clean_Release.sh b/scripts/build/docker_BUILD_Clean_Release.sh index be268d0d..f046c678 100755 --- a/scripts/build/docker_BUILD_Clean_Release.sh +++ b/scripts/build/docker_BUILD_Clean_Release.sh @@ -10,14 +10,18 @@ if [ -e /workspace ]; then mkdir -p "${OUTPUT_FOLDER}" bash "${SCRIPT_DIR}/_build_ecu.sh" TARGET_ECUA Release "$@" cp -pr "/workspace/firmware/${PROJECT_NAME}/Release/${PROJECT_NAME}.hex" "${OUTPUT_FOLDER}/ECUA.hex" + cp -p "/workspace/firmware/${PROJECT_NAME}/Release/${PROJECT_NAME}.elf" "${OUTPUT_FOLDER}/ECUA.elf" bash "${SCRIPT_DIR}/_build_ecu.sh" TARGET_ECUB Release --skip-import "$@" cp -pr "/workspace/firmware/${PROJECT_NAME}/Release/${PROJECT_NAME}.hex" "${OUTPUT_FOLDER}/ECUB.hex" + cp -p "/workspace/firmware/${PROJECT_NAME}/Release/${PROJECT_NAME}.elf" "${OUTPUT_FOLDER}/ECUB.elf" bash "${SCRIPT_DIR}/_build_ecu.sh" TARGET_ECUB Release --skip-import -D CHASSIS_LINEAR_POTENTIOMETER "$@" cp -pr "/workspace/firmware/${PROJECT_NAME}/Release/${PROJECT_NAME}.hex" "${OUTPUT_FOLDER}/ECUB_LINEAR.hex" bash "${SCRIPT_DIR}/_build_ecu.sh" TARGET_ECUC Release --skip-import "$@" cp -pr "/workspace/firmware/${PROJECT_NAME}/Release/${PROJECT_NAME}.hex" "${OUTPUT_FOLDER}/ECUC.hex" + cp -p "/workspace/firmware/${PROJECT_NAME}/Release/${PROJECT_NAME}.elf" "${OUTPUT_FOLDER}/ECUC.elf" bash "${SCRIPT_DIR}/_build_ecu.sh" TARGET_ECUD Release --skip-import "$@" cp -pr "/workspace/firmware/${PROJECT_NAME}/Release/${PROJECT_NAME}.hex" "${OUTPUT_FOLDER}/ECUD.hex" + cp -p "/workspace/firmware/${PROJECT_NAME}/Release/${PROJECT_NAME}.elf" "${OUTPUT_FOLDER}/ECUD.elf" exit 0 fi