-1

First of all, I'm trying to compile a C code to run on BeagleBone Black baremetal, through u-boot console.

Codes without includes compile and run just fine, but I'm trying to transmit some information through serial port and I'm not being successfull. So i tried to use the printf implementation from u-boot which seems to be accessed by including the header common.h, but the compiller is throwing a lot of errors when I try it.

I saw that U-boot has a printf implementation on one of the headers(common.h) and I was trying to use it, so I've included it on my source code as the following image shows:

enter image description here

and then I specified the path to the file.

but it shows an error related to not finding omap.h, it's supposed to be on asm/arch/include/omap.h but i don't have this path on my U-boot folder, so I tried to look for an omap.h on the folder and found these ones:

enter image description here

So, I've included the one who ends with arm-am33xx (since the board is am335x), and changed the path of the file who was looking for it, but now my compiller is showing a bunch of errors that I don't understand why:

enter image description here

Am I doing something wrong??

asked Oct 6, 2023 at 16:58
1
  • Post the code that you have been tried Commented Oct 9, 2023 at 12:23

1 Answer 1

1

If you wish to write bare metal applications that are then launched by U-Boot AND also leverage the limited API that U-Boot provides for this, please see https://source.denx.de/u-boot/u-boot/-/blob/master/doc/README.standalone?ref_type=heads and https://source.denx.de/u-boot/u-boot/-/blob/master/examples/standalone/hello_world.c?ref_type=heads for how this is done. You cannot use <common.h> as that is for U-Boot itself.

answered Oct 9, 2023 at 15:53
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.