Ceedling Error Post Renesas FSP Version Update

55 views
Skip to first unread message

Pranoti Joshi

unread,
Mar 28, 2025, 7:17:12 AMMar 28
to ThrowTheSwitch Forums
Hello Team,

My source code and the Renesas FSP Version was updated from version 5.2 to 5.4.

Project Summary

Board:  Custom User Board (Any Device)
Device:  R7FA8T1AHECFC
Toolchain:  GCC ARM Embedded
Toolchain Version:  13.2.1.arm-13-7
FSP Version:  5.4.0
Project Type:  Flat

I am able to build the project in the IDE without error.
When I try to rerun my test cases on the updated submodules,
I am getting the below error:
----------------------------------------------------------------------------------------------------------------------------------------------------

C:\Users\PranotiJoshi\Documents\BlueHeartSWCB5\UnitTestcontrolbox5swFSP54>ceedling test:ad7606c


Test 'test_ad7606c.c'
---------------------
In file included from ../CB5SW2803/ra/arm/CMSIS_6/CMSIS/Core/Include/cmsis_compiler.h:52:0,
                 from ../CB5SW2803/ra/fsp/inc/api/../../src/bsp/cmsis/Device/RENESAS/Include/renesas.h:28,
                 from ../CB5SW2803/ra/fsp/inc/api/bsp_api.h:36,
                 from ../CB5SW2803/ra/fsp/inc/api/r_spi_api.h:27,
                 from build/temp/_test_ad7606c.c:4:
../CB5SW2803/ra/arm/CMSIS_6/CMSIS/Core/Include/cmsis_gcc.h:1003:4: error: #error "Unknown Arm architecture profile"
   #error "Unknown Arm architecture profile"
    ^~~~~
ERROR: Shell command failed.
> Shell executed command:
'gcc.exe -E -MM -MG -I"C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src" -I"C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ceedling-0.31.1/vendor/c_exception/lib" -I"C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ceedling-0.31.1/vendor/cmock/src" -I"build/test/mocks" -I"test" -I"test/ad7606c" -I"test/support" -I"src" -I"../CB5SW2803/src" -I"../CB5SW2803/lib/segger_rtt/RTT" -I"../CB5SW2803/lib/segger_rtt/Config" -I"../CB5SW2803/ra/arm/CMSIS_6/CMSIS/Core/Include" -I"../CB5SW2803/ra/arm/CMSIS_6/CMSIS/Core/Include/a-profile" -I"../CB5SW2803/ra/arm/CMSIS_6/CMSIS/Core/Include/m-profile" -I"../CB5SW2803/ra/arm/CMSIS_6/CMSIS/Core/Include/r-profile" -I"../CB5SW2803/ra/fsp/inc/api" -I"../CB5SW2803/ra/fsp/inc" -I"../CB5SW2803/ra/fsp/inc/instances" -I"../CB5SW2803/ra/fsp/src/bsp/mcu/ra8t1" -I"../CB5SW2803/bsp/inc" -I"../CB5SW2803/ra_cfg/fsp_cfg/bsp" -I"../CB5SW2803/ra_gen" -I"../CB5SW2803/ra_cfg/fsp_cfg/azure/tx" -I"../CB5SW2803/ra/microsoft/azure-rtos/threadx/common/inc" -I"../CB5SW2803/ra/fsp/src/rm_threadx_port" -I"../CB5SW2803/ra/fsp/src/bsp/mcu/all" -I"../CB5SW2803/ra/microsoft/azure-rtos/netxduo/common/inc" -I"../CB5SW2803/ra/microsoft/azure-rtos/netxduo/ports/cortex_m4/ac5/inc" -I"../CB5SW2803/ra/fsp/src/rm_netxduo_ether" -I"../CB5SW2803/ra_cfg/fsp_cfg" -I"../CB5SW2803/inc" -I"../CB5SW2803/module/inc" -DTEST -DTEST -DGNU_COMPILER "build/temp/_test_ad7606c.c"'
> And exited with status: [1].

rake aborted!
ShellExecutionException: ShellExecutionException
C:/Ruby27-x64/bin/ceedling:23:in `load'
C:/Ruby27-x64/bin/ceedling:23:in `<main>'
Tasks: TOP => test:ad7606c
(See full trace by running task with --trace)
ERROR: Ceedling Failed
-----------------------------------------------------------------------------------------------------------------------------------------------------

Can you please suggest a workaround to continue with the testing?

Mark Vander Voord

unread,
Mar 28, 2025, 8:59:26 AMMar 28
to throwth...@googlegroups.com
Does your IDE allow you to show the verbose output? If so, I'd do so. Very likely there is a new define that you need to add to specify your architecture or a new flag the compiler needs?

Paul V

unread,
Mar 28, 2025, 2:10:05 PMMar 28
to ThrowTheSwitch Forums
The macro #error in the header cmsis_gcc.h has been compiled due to some preprocessor condition, that checks the currently set architecture profile (to be more precise - it hasn't been set). Yuo should check what the  preprocessor condition is checked around the line 1004 in cmsis_gcc.h and find out why that  preprocessor condition isn't meet.
You could also attach the header  cmsis_gcc.h.

You could read the changelog to the version 5.4. Perhaps the necessary adjustment of the architecture profile is described there.

Pranoti Joshi

unread,
Mar 31, 2025, 8:14:21 AMMar 31
to ThrowTheSwitch Forums
I am attaching the cmsis_gcc file.
cmsis_gcc.h

Paul V

unread,
Mar 31, 2025, 2:40:03 PMMar 31
to ThrowTheSwitch Forums

The compiler you use in the ceedling enviroment obviously doesn't have the predefined macro __ARM_ARCH_PROFILE. The special versions of gcc compiler for ARm uC should defines such a macros.

You can define the appropriate value of __ARM_ARCH_PROFILE in your ceeling project.

Pranoti Joshi

unread,
Apr 1, 2025, 6:56:24 AMApr 1
to ThrowTheSwitch Forums
I did updates as suggested. Now when I try to run I am getting below error:

Compiling ad7606c.c...
In file included from ../CB5SW2803/ra/fsp/inc/api/bsp_api.h:36:0,
                 from ../CB5SW2803/ra_gen/sensor_thread.h:4,
                 from ../CB5SW2803/bsp/src/adc/ad7606c.c:13:
../CB5SW2803/ra/fsp/inc/api/../../src/bsp/cmsis/Device/RENESAS/Include/renesas.h:139:4: warning: #warning Unsupported Architecture [-Wcpp]
   #warning Unsupported Architecture
    ^~~~~~~
In file included from ../CB5SW2803/ra/fsp/inc/api/bsp_api.h:65:0,
                 from ../CB5SW2803/ra_gen/sensor_thread.h:4,
                 from ../CB5SW2803/bsp/src/adc/ad7606c.c:13:
../CB5SW2803/ra/fsp/inc/api/../../src/bsp/mcu/all/bsp_delay.h:68:1: warning: 'naked' attribute directive ignored [-Wattributes]
 BSP_ATTRIBUTE_STACKLESS void bsp_prv_software_delay_loop(uint32_t loop_cnt);
 ^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\PRANOT~1\AppData\Local\Temp\ccWfADIk.s: Assembler messages:
C:\Users\PRANOT~1\AppData\Local\Temp\ccWfADIk.s:77: Error: no such instruction: `bkpt '

ERROR: Shell command failed.
> Shell executed command:
'gcc.exe -I"C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src" -I"C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ceedling-0.31.1/vendor/c_exception/lib" -I"C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ceedling-0.31.1/vendor/cmock/src" -I"build/test/mocks" -I"test" -I"test/ad7606c" -I"test/ads8698" -I"test/amc131m02" -I"test/support" -I"src" -I"../CB5SW2803/src" -I"../CB5SW2803/lib/segger_rtt/RTT" -I"../CB5SW2803/lib/segger_rtt/Config" -I"../CB5SW2803/ra/arm/CMSIS_6/CMSIS/Core/Include" -I"../CB5SW2803/ra/arm/CMSIS_6/CMSIS/Core/Include/a-profile" -I"../CB5SW2803/ra/arm/CMSIS_6/CMSIS/Core/Include/m-profile" -I"../CB5SW2803/ra/arm/CMSIS_6/CMSIS/Core/Include/r-profile" -I"../CB5SW2803/ra/fsp/inc/api" -I"../CB5SW2803/ra/fsp/inc" -I"../CB5SW2803/ra/fsp/inc/instances" -I"../CB5SW2803/ra/fsp/src/bsp/mcu/ra8t1" -I"../CB5SW2803/bsp/inc" -I"../CB5SW2803/ra_cfg/fsp_cfg/bsp" -I"../CB5SW2803/ra_gen" -I"../CB5SW2803/ra_cfg/fsp_cfg/azure/tx" -I"../CB5SW2803/ra/microsoft/azure-rtos/threadx/common/inc" -I"../CB5SW2803/ra/fsp/src/rm_threadx_port" -I"../CB5SW2803/ra/fsp/src/bsp/mcu/all" -I"../CB5SW2803/ra/microsoft/azure-rtos/netxduo/common/inc" -I"../CB5SW2803/ra/microsoft/azure-rtos/netxduo/ports/cortex_m4/ac5/inc" -I"../CB5SW2803/ra/fsp/src/rm_netxduo_ether" -I"../CB5SW2803/ra_cfg/fsp_cfg" -I"../CB5SW2803/inc" -I"../CB5SW2803/module/inc" -DTEST -DGNU_COMPILER -g -c "../CB5SW2803/bsp/src/adc/ad7606c.c" -o "build/test/out/c/ad7606c.o" -MMD -MF "build/test/dependencies/ad7606c.d"'

> And exited with status: [1].

#<Thread:0x0000000006fae730 C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ceedling-0.31.1/lib/ceedling/par_map.rb:7 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
        11: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ceedling-0.31.1/lib/ceedling/par_map.rb:10:in `block (2 levels) in par_map'
        10: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ceedling-0.31.1/lib/ceedling/task_invoker.rb:97:in `block in invoke_test_objects'
         9: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:188:in `invoke'
         8: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
         7: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:199:in `synchronize'
         6: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
         5: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:281:in `execute'
         4: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:281:in `each'
         3: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rake-13.0.1/lib/rake/task.rb:281:in `block in execute'
         2: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ceedling-0.31.1/lib/ceedling/rules_tests.rake:17:in `block in <top (required)>'
         1: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ceedling-0.31.1/lib/ceedling/generator.rb:99:in `generate_object_file'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ceedling-0.31.1/lib/ceedling/tool_executor.rb:88:in `exec': ShellExecutionException (ShellExecutionException)
rake aborted!
ShellExecutionException: ShellExecutionException

Tasks: TOP => build/test/out/c/ad7606c.o

(See full trace by running task with --trace)
ERROR: Ceedling Failed

Paul V

unread,
Apr 2, 2025, 9:28:35 AMApr 2
to ThrowTheSwitch Forums
I suppose your troubles are you compile the hardware-related source code in ceedling tests. It is probably possible, but I would recommend to avoid that as long as possible. The primary goal of unit tests (ceedling tests) is to test your algorithms, not the interaction with hardware. Therefore the isolation tier should be created and involved in the unit tests and mocked/stubbed.

Of cause it is not always simple. If your SuT code does include hardware-related headers (e.g. cmsis), you are in trouble. IMO you need the isolation in that case.


In your specific case. Why are the files ad7606.c and ccWfADIk.s compiled? That files contain obviously the hw-related code that MUST be isolated from your feeling tests. You should review the  code base involved in the feeling project and prevent the compilation of the files contain the hw-related code: either delete that files or define all files to be compiled in your creeping project explicitly.

Such content as "bkpt" is definitely not needed in the ceedling environment.

Paul V

unread,
Apr 2, 2025, 9:32:00 AMApr 2
to ThrowTheSwitch Forums
Sorry for "feeling" tests... It was autocorrection, it should be "ceedling" tests of course.
Reply all
Reply to author
Forward
0 new messages