I have not yet delved into any detail of what this actually does, but it will load and run.
There are also a lot of other examples, however most so far come back with a boot failed: -22 error when loading the firmware. I think some/many are designed to be run from boot, with no OS.
Perhaps they do actually work, but because they don’t setup rpmsg the kernel thinks they have failed ? No idea what error 22 is.
There is quite a bit of documentation, however not so much to get a bare-bones project up and running.
The -22 I think is a bit of a catchall, I think it may well be to do with how it was linked, memory access, DMA who knows. I thought it was maybe something to do with how the kernel was set up with memory for each core, I have not investigated this yet.
I have taken a similar approach but used the vision apps examples from the same RTOS package, trying to run something built for one core on another can give you that -22, or totally hang everything!
To be honest the vision apps make stuff is a behemoth I’m guessing they have some tool to generate it, so have not got much further than enabling the extra cores and running them on the AI-64, so it is great you have found a better example to use, I will take a look at that one.
I’ve just started looking at the R5F cores and how to build binaries, preferably without the bulky PDK.
We are using the Yocto/Poky approach with meta-ti added. Since it’s a multi-build, it starts with building the code for R5F (and perhaps the Cortex M4) then proceeds with the A72’s, like this:
bomellberg@bosse-buildcom:~/se3linux/yocto-base/build$ MACHINE=beaglebone-ai64 bitbake linux-bb.org
Loading cache: 100% |#######################################################################################################################################| Time: 0:00:00
Loaded 8754 entries from dependency cache.
Parsing recipes: 100% |#####################################################################################################################################| Time: 0:00:00
Parsing of 5684 .bb files complete (5682 cached, 2 parsed). 8756 targets, 501 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
NOTE: Resolving any missing task queue dependencies
NOTE: Resolving any missing task queue dependencies
NOTE: Resolving any missing task queue dependencies
Build Configuration (mc:default):
BB_VERSION = "2.0.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "aarch64-poky-linux"
MACHINE = "beaglebone-ai64"
DISTRO = "se3linux"
DISTRO_VERSION = "3.0"
TUNE_FEATURES = "aarch64"
TARGET_FPU = ""
DISTRO_CODENAME = "muriwaimanu"
GCCVERSION = "11.3%"
meta
meta-poky
meta-yocto-bsp = "HEAD:03e4da602f0dbd46b4f03f2a5c6fccae6d547045"
meta-se-as
meta-se3linux
meta-nsp = "add-meta-ti:a282c8874fe517375a5f35bdd0b250adf8126c85"
meta-oe
meta-networking
meta-perl
meta-python
meta-multimedia = "HEAD:8f96c05f6d82fde052f2cb1652c13922814accb0"
workspace = "add-meta-ti:a282c8874fe517375a5f35bdd0b250adf8126c85"
meta-arm-toolchain
meta-arm = "HEAD:a0216a41bde3f191037332a9238648bedfbc61bd"
meta-ti-bsp
meta-ti-extras = "HEAD:1d7123f85a84113a39a5e22397a0d63dfa5edf21"
meta-tpm = "kirkstone:cc20e2af2ae1c74e306f6c039c4963457c4cbd0f"
Build Configuration:
BB_VERSION = "2.0.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "beaglebone-ai64-k3r5"
DISTRO = "se3linux"
DISTRO_VERSION = "3.0"
TUNE_FEATURES = "arm armv7a vfp thumb callconvention-hard"
TARGET_FPU = "hard"
DISTRO_CODENAME = "muriwaimanu"
GCCVERSION = "11.3%"
meta
meta-poky
meta-yocto-bsp = "HEAD:03e4da602f0dbd46b4f03f2a5c6fccae6d547045"
meta-se-as
meta-se3linux
meta-nsp = "add-meta-ti:a282c8874fe517375a5f35bdd0b250adf8126c85"
meta-oe
meta-networking
meta-perl
meta-python
meta-multimedia = "HEAD:8f96c05f6d82fde052f2cb1652c13922814accb0"
workspace = "add-meta-ti:a282c8874fe517375a5f35bdd0b250adf8126c85"
meta-arm-toolchain
meta-arm = "HEAD:a0216a41bde3f191037332a9238648bedfbc61bd"
meta-ti-bsp
meta-ti-extras = "HEAD:1d7123f85a84113a39a5e22397a0d63dfa5edf21"
meta-tpm = "kirkstone:cc20e2af2ae1c74e306f6c039c4963457c4cbd0f"
WARNING: /home/bomellberg/se3linux/yocto-base/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-bb.org_git.bb:do_compile is tainted from a forced run | ETA: 0:00:00
WARNING: /home/bomellberg/se3linux/yocto-base/sources/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-bb.org_git.bb:do_deploy is tainted from a forced run
Initialising tasks: 100% |##################################################################################################################################| Time: 0:00:01
Sstate summary: Wanted 8 Local 8 Mirrors 0 Missed 0 Current 152 (100% match, 100% complete)
NOTE: Executing Tasks
NOTE: Tasks Summary: Attempted 743 tasks of which 743 didn't need to be rerun and all succeeded.
Summary: There were 2 WARNING messages.
As a result there are two binaries in my deploy-folder:
-rw-r--r-- 2 bomellberg bomellberg 292348 May 5 10:48 ipc_echo_testb_mcu1_0_release_strip.xer5f
-rw-r--r-- 2 bomellberg bomellberg 290668 May 5 10:48 ipc_echo_testb_mcu1_0_release_strip.xer5f.unsigned
I haven’t been able to use these in any of the R5F-cores. I guess it is not meant to run there. mcu1_0 must be one of the other cores.
However, I find a lot of other xer5f files in my build tree. Two of these I have been able to load and run:
I can build the echo test for the main R5F cores (MCU_2_0, MCU_2_1, MCU_3_0, MCU_3_1) from the PDK sources. I’m setting BOARD=j721e_evm which is the TI evaluation board.
So maybe it’s not surprising that the resulting firmware doesn’t exactly work as expected. Only MCU_2_0 (which is also known as main-r5f0-0) will run and generate echo responses. BUT – my serial interface goes away. I can only log on to the BBAI-64 over ethernet. The other three R5F cores don’t seem to work at all and typically lock up the Linux side as well.
Now I guess I need to find out how TI pre-built the firmware for the BeagleBone. Perhaps in a newer PDK they have a BOARD=bbai64 or something like that? It’s not in the version I am currently using.
Okay, I found my problem with the serial interface going away. In the latest PDK source, the call to board_init only happens if the R5F is booting before Linux comes up. I removed that call from my code and now things are working better.
Hi again, I am trying to use MCU(r5f) on BBAI-64, but how to upload firmware? → i lost
So, What I would like to ask you is the following.
as I said, how to upload firmware to use MCU?
is there any example code for it? I cannot find any sources from the directory below : ti-processor-sdk-rtos-j721e-evm-08_02_00_05/pdk_jacinto_08_02_00_21/packages/ti/