IMX93 - Boot Cortex-M33 with Barebox

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX93 - Boot Cortex-M33 with Barebox

94 Views
jlablanche
Contributor I

Dear support team,

We are designing our custom board with an IMX9332C.

We chose not to use U-Boot as our bootloader, but Barebox instead, so sadly we cannot benefit from the work already done in uboot-imx. Our boot chain is as follows: TF-A → Barebox → Linux.
Versions: imx-atf lf-6.18.20-2.0.0, Barebox 2025.09.0 (custom board port), Linux 6.18.13.

We want to use the Cortex-M33 auxiliary core for our real-time-constrained features. The idea is to compile bare-metal code with the SDK, then load the resulting binary via the remoteproc framework from Linux.

I wrote and compiled a very simple C program that blinks an IO. When I load it with remoteproc, the framework reports that it has been loaded, but it does absolutely nothing. Whenever I stop it, it crashes.

My first guess was that the core wasn't correctly configured, so I dug into how u-boot prepares the M33 on NXP's FRDM reference board. I found that the M33 core has to be "prepared": its RAM must be zeroized, the watchdog configured, the TCM set up, etc. I ported some of these operations into my low-level initialization code in Barebox, but now when I load the code with remoteproc, it resets instantly.

At this point, I looked at the SRSR register to find the root cause of the reset, and the M33_REQ bit is set.

Looking at the documentation, this means a reset was requested by the Cortex-M33 itself.

I currently have no idea why this reset request is emitted; it isn't triggered anywhere in my own code.

Here are my questions:

Is there any documentation on the full requirements for "preparing" the M33?
What are the possible sources of a CM33_REQUEST reset ? Where could this come from?
Thank you.

0 Kudos
Reply
1 Reply

7 Views
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @jlablanche 

I hope you are doing very well.
 
 
Unfortunately, we do not support the Barebox Bootloader in our platforms.
 
But you can take as started point the chapter 4.7.4.1.4  i.MX 93 and  i.MX 93W from the i.MX Linux User's Guide:
 
image.pngimage.png
 
Here you can take a look to the prepare_mcore.
 
 
 
Regarding to the CM33_REQUEST in SRSR.
 
This can be because of the WDOG1 timeout.
 
If your Barebox init code enabled WDOG1 but your bare-metal firmware does not service it in time, the watchdog expires and asserts SYSRESETREQ.
 
 
 
Best regards,
Salas.
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2407033%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EIMX93%20-%20Boot%20Cortex-M33%20with%20Barebox%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2407033%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EDear%20support%20team%2C%3C%2FP%3E%3CP%3EWe%20are%20designing%20our%20custom%20board%20with%20an%20IMX9332C.%3C%2FP%3E%3CP%3EWe%20chose%20not%20to%20use%20U-Boot%20as%20our%20bootloader%2C%20but%20Barebox%20instead%2C%20so%20sadly%20we%20cannot%20benefit%20from%20the%20work%20already%20done%20in%20uboot-imx.%20Our%20boot%20chain%20is%20as%20follows%3A%20TF-A%20%E2%86%92%20Barebox%20%E2%86%92%20Linux.%3CBR%20%2F%3EVersions%3A%20imx-atf%20lf-6.18.20-2.0.0%2C%20Barebox%202025.09.0%20(custom%20board%20port)%2C%20Linux%206.18.13.%3C%2FP%3E%3CP%3EWe%20want%20to%20use%20the%20Cortex-M33%20auxiliary%20core%20for%20our%20real-time-constrained%20features.%20The%20idea%20is%20to%20compile%20bare-metal%20code%20with%20the%20SDK%2C%20then%20load%20the%20resulting%20binary%20via%20the%20remoteproc%20framework%20from%20Linux.%3C%2FP%3E%3CP%3EI%20wrote%20and%20compiled%20a%20very%20simple%20C%20program%20that%20blinks%20an%20IO.%20When%20I%20load%20it%20with%20remoteproc%2C%20the%20framework%20reports%20that%20it%20has%20been%20loaded%2C%20but%20it%20does%20absolutely%20nothing.%20Whenever%20I%20stop%20it%2C%20it%20crashes.%3C%2FP%3E%3CP%3EMy%20first%20guess%20was%20that%20the%20core%20wasn't%20correctly%20configured%2C%20so%20I%20dug%20into%20how%20u-boot%20prepares%20the%20M33%20on%20NXP's%20FRDM%20reference%20board.%20I%20found%20that%20the%20M33%20core%20has%20to%20be%20%22prepared%22%3A%20its%20RAM%20must%20be%20zeroized%2C%20the%20watchdog%20configured%2C%20the%20TCM%20set%20up%2C%20etc.%20I%20ported%20some%20of%20these%20operations%20into%20my%20low-level%20initialization%20code%20in%20Barebox%2C%20but%20now%20when%20I%20load%20the%20code%20with%20remoteproc%2C%20it%20resets%20instantly.%3C%2FP%3E%3CP%3EAt%20this%20point%2C%20I%20looked%20at%20the%20SRSR%20register%20to%20find%20the%20root%20cause%20of%20the%20reset%2C%20and%20the%20M33_REQ%20bit%20is%20set.%3C%2FP%3E%3CP%3ELooking%20at%20the%20documentation%2C%20this%20means%20a%20reset%20was%20requested%20by%20the%20Cortex-M33%20itself.%3C%2FP%3E%3CP%3EI%20currently%20have%20no%20idea%20why%20this%20reset%20request%20is%20emitted%3B%20it%20isn't%20triggered%20anywhere%20in%20my%20own%20code.%3C%2FP%3E%3CP%3EHere%20are%20my%20questions%3A%3C%2FP%3E%3CP%3EIs%20there%20any%20documentation%20on%20the%20full%20requirements%20for%20%22preparing%22%20the%20M33%3F%3CBR%20%2F%3EWhat%20are%20the%20possible%20sources%20of%20a%20CM33_REQUEST%20reset%20%3F%20Where%20could%20this%20come%20from%3F%3CBR%20%2F%3EThank%20you.%3C%2FP%3E%3C%2FLINGO-BODY%3E