BRAM Overflow while building object detection code sample

I am getting that error when I try to object detection build section: Object Detection Code Sample

Before, I didn’t get this error and I didn’t change anything then I got this error suddenly.

Hi @ek-10

Thanks for getting in contact, you said you didn’t change anything, but did you change the version of GCC you are using?

Also could you tell us what version of the evaluation kit are you using? We did push some changes for our 23.11 release to fix this kind of overflow issue that we saw when using latest versions of GCC and building for Debug.

My GCC version is: arm-none-eabi-gcc (Arm GNU Toolchain 13.2.rel1)

I’ve switched the evaluation kit to 23.11 and I still get same problem.

I’ll give it a try myself to see if I can replicate and let you know.

1 Like

Just for my understanding - I don’t see the culprit in the above snapshot. ld returning exist status should have shown some error more verbosely before this too?

1 Like

Are you building from the latest changes on the main branch? The change that @Burton2000 was referring to has the message “MLECO-4374 Fix ITCM overflow issues flagged by CI” and has hash 10b8f41.

This commit was pushed after the tagged 23.11 release.

Just tested it on 23.11 tag and all builds fine for me. I used the following commands from the root directory:

mkdir build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/toolchains/bare-metal-gcc.cmake -DTARGET_PLATFORM=mps3 -DUSE_CASE_BUILD=object_detection -DCMAKE_BUILD_TYPE=Debug && make -j4

This is with the same 13.2.rel1 Arm GNU Toolchain on native Ubuntu 22.04

Hi Burton, error comes with ‘make -j4’ command after cmake commands.

Very strange. Just to check did you try deleting your build folder and making a new before running the command I sent above. Also, after swapping to 23.11 are your submodules all up-to-date, e.g. by running:

git submodule update

from the root directory.

Let me know if this helps.

Hi @ek-10, to add to @Burton2000’s comment, these are some steps I’ve used to clean the project in the past:

rm -rf dependencies/tensorflow/tensorflow/lite/micro/tools/make/downloads/
rm -rf resources_downloaded
git submodule update
# create or activate your preferred python environment
python set_up_default_resources.py
mkdir build_object_detection && cd build_object_detection
cmake ../ -DUSE_CASE_BUILD=object_detection
cmake .. \
    -DCMAKE_TOOLCHAIN_FILE=scripts/cmake/toolchains/bare-metal-armclang.cmake \
    -DCMAKE_BUILD_TYPE=Debug \
    -DUSE_CASE_BUILD=object_detection
make -j4
1 Like

Hello Alex, I tried what you sent but I am still getting the same error. I have no any idea why it’s happening.

Hi @ek-10, just to confirm - which commit are you on? @AlexTawseArm mentioned BRAM Overflow while building object detection code sample - #7 by AlexTawseArm that the fix for this is after 23.11-rc1. Just making sure this wasn’t missed.

Thanks,
KS

Hi KS, I’ve switched the branch to the 23.11-rc1 and that fixed the problem. Thanks! I will add custom model to the object detection.

I’m glad to hear you got it working @ek-10!