AnsweredAssumed Answered

u-Boot and standalone applications

Question asked by Eric Fornstedt on Mar 30, 2017
Latest reply on May 1, 2018 by Brett Stahlman

Hi,

 

We are using a P1020RDP-PD board for a development project, and there are some things about u-Boot and standalone  
applications which we don't quite understand.

 

Together with u-Boot, an example "Hello World"-application is build as a binary. We can put that binary into an  image file with mkimage, download it through ymodem and boot it with bootm. This part works fine.

 

But, if we try the same with the binary from CodeWarrior Bare-board sample project, there application crashes at the  
printf-statement. That is, if we put the binary into an image and let u-Boot boot it. If we download it with CodeWarrior, and thereby bypass u-Boot, it works fine.

 

So we have two scenarios:

 

  • Download binary to RAM through CodeWarrior and execute -> Works fine.
  • Download same binary (in image file) to RAM through u-Boot and boot with bootm command -> Crash.

 

We have verified that the binary is put at the same address in both cases and the entry point is also the same.

 

If the printf-statement is stripped out from the application, so that basically only the while(1) remains, the application "works" and do not crash. It seems the printf-statement included in the binary does not work very well together with u-Boot, which might be by design.

 

This leads us to two question about this.

 

  1. Can we use u-Boot o boot an application that execute in a "clean" environment, similar to what it executes in when downloaded with CodeWarrior? With no interference of u-Boot, just as a bare-board application.
  2. If that is not the way forward, what is required from our application to make it run properly from u-Boot?

 

Any thoughts or ideas are appreciated!

 

BR
/ Eric

Outcomes