Trouble with addr_abort exception on arm/imx7 BSP with simple RTEMS code

Christian Mauderer oss at c-mauderer.de
Sat Feb 6 11:38:20 UTC 2021


Hello Stefan,

sorry for not answering earlier. I somehow missed the mail.

On 02/02/2021 18:02, Stefan Akatyschew wrote:
> Hey together!
> 
> I'm new to RTEMS and just hit some errors, I just can't figure out. 
> Since I will probably lure around a bit longer, I wanted to give short 
> introduction, so you can estimate what to expect from me: I'm a 
> nearly-finished(tm) EE undergrad from Germany, not having any hands-on 
> experience on RTOS, my embedded knowledge is confined to some hobby 
> STM32/PIC projects and the usual microcontroller stuff they teach at 
> uni. Not a great starting point for something as advanced as RTEMS, I'm 
> aware, but I'm eager to learn it. Besides embedded stuff I'm also into 
> the RF electronics :)

It's not a too bad starting point either. It's quite similar to the one 
I had when I had my first contact with RTEMS.

> Goal of my engagement with RTEMS: Setting up a small SMP Demo 
> Application on the Phytec Zeta i.MX7d Board 
> https://www.phytec.eu/product-eu/single-board-computer/phyboard-zeta/ 
> for a university project, though after getting to know RTEMS, I hope to 
> be able to stick around after that, the applications in (aero)space, are 
> exactly what I'm passionate about! Also I hope after I get to run 
> everything, I can compile and publish my documentation/experience to 
> help others with the i.MX 7, since the road has been rather rocky for me 
> now.
> 

I hope I didn't add too much stones to the road. I worked quite a bit on 
the imx BSP when I added i.MX 6 and some of the changes haven't been 
extensively tested on i.MX 7.

> 
> So to my actual problem: I have the before mentioned i.MX 7d Board and a 
> Lauterbach Power Debug Interface with trace32, to directly flash my 
> binaries onto the SRAM. I'm using their i.MX7d SABRE configuration file, 
> which successfully worked with their sample binary and slightly modified 
> it (mainly deactivating ETF on-chip tracing).
> 
> I've built the RTEMS 5 toolchain according to your quick-start guide ( 
> https://docs.rtems.org/branches/master/user/start/index.html), with some 
> slight modifications arm/imx7 on my Ubuntu 18.04 VM (kernel built from 
> sources, somehow didn't work otherwise). I also built the simplest demo 
> application from 2.7, which went without problems (well, after many 
> hours of troubleshooting stupid mistakes). Now after flashing the binary 
> directly to the SRAM with my Lauterbach Debugger (without RTEMS OS 
> Awareness yet), I end up in the exception routine 
> "_ARMV4_Exception_data_abort_default", with the following 
> call-tree-hierarchy:
> 

Can you hit "Up" once and take a look at the code location and send a 
screen shot. Best thing would be the mode that shows assembler 
istructions too. And maybe the window with the CPU registers.

Best regards

Christian

> I also tried removing the printf (just letting it count an integer up 
> and overflow), since I was confused why RTEMS would call a uart_write 
> function otherwise, but that didn't change anything and actually doesn't 
> even get to the Init rtems_task.
> 
> I already looked on the internet, the documentation and the mailing-list 
> archive for help (not nearly finished reading through the complete 
> Classic API Guide and User Manual, that'll take some time). 
> Unfortunately I'm also new to the Lauterbach Debugger, which seems to be 
> a beast of its own, so I unfortunately can't provide any useful on-chip 
> trace data yet. I hope anyone can point me to the, probably rather 
> obvious, mistake I'm making, any help is appreciated!
> 
> 
> Last but not least, thanks for your awesome work on RTEMS!
> 
> Kind regards,
> Stefan
> 
> 
> Attached some maybe useful outputs:
> 
> stefan at rtems-vm:~$ arm-rtems5-gcc --version
> arm-rtems5-gcc (GCC) 7.5.0 20191114 (RTEMS 5, RSB 5.1, Newlib 7947581)
> 
> ./waf configure --rtems=$HOME/rtems/5 --rtems-bsp=arm/imx7
> Setting top to                           : 
> /home/stefan/VCS/rtems-bp/first-test
> Setting out to                           : 
> /home/stefan/VCS/rtems-bp/first-test/build
> RTEMS Version                            : 5
> Architectures                            : arm-rtems5
> Board Support Package (BSP)              : arm-rtems5-imx7
> Show commands                            : no
> Long commands                            : no
> Checking for program 'arm-rtems5-gcc'    : 
> /home/stefan/rtems/5/bin/arm-rtems5-gcc
> Checking for program 'arm-rtems5-g++'    : 
> /home/stefan/rtems/5/bin/arm-rtems5-g++
> Checking for program 'arm-rtems5-gcc'    : 
> /home/stefan/rtems/5/bin/arm-rtems5-gcc
> Checking for program 'arm-rtems5-ld'     : 
> /home/stefan/rtems/5/bin/arm-rtems5-ld
> Checking for program 'arm-rtems5-ar'     : 
> /home/stefan/rtems/5/bin/arm-rtems5-ar
> Checking for program 'arm-rtems5-nm'     : 
> /home/stefan/rtems/5/bin/arm-rtems5-nm
> Checking for program 'arm-rtems5-objdump' : 
> /home/stefan/rtems/5/bin/arm-rtems5-objdump
> Checking for program 'arm-rtems5-objcopy' : 
> /home/stefan/rtems/5/bin/arm-rtems5-objcopy
> Checking for program 'arm-rtems5-readelf' : 
> /home/stefan/rtems/5/bin/arm-rtems5-readelf
> Checking for program 'arm-rtems5-strip'   : 
> /home/stefan/rtems/5/bin/arm-rtems5-strip
> Checking for program 'arm-rtems5-ranlib'  : 
> /home/stefan/rtems/5/bin/arm-rtems5-ranlib
> Checking for program 'rtems-ld'           : 
> /home/stefan/rtems/5/bin/rtems-ld
> Checking for program 'rtems-tld'          : 
> /home/stefan/rtems/5/bin/rtems-tld
> Checking for program 'rtems-syms'         : 
> /home/stefan/rtems/5/bin/rtems-syms
> Checking for program 'rtems-bin2c'        : 
> /home/stefan/rtems/5/bin/rtems-bin2c
> Checking for program 'tar'                : /bin/tar
> Checking for program 'gcc, cc'            : 
> /home/stefan/rtems/5/bin/arm-rtems5-gcc
> Checking for program 'ar'                 : 
> /home/stefan/rtems/5/bin/arm-rtems5-ar
> Checking for program 'g++, c++'           : 
> /home/stefan/rtems/5/bin/arm-rtems5-g++
> Checking for program 'ar'                 : 
> /home/stefan/rtems/5/bin/arm-rtems5-ar
> Checking for program 'gas, gcc'           : 
> /home/stefan/rtems/5/bin/arm-rtems5-gcc
> Checking for program 'ar'                 : 
> /home/stefan/rtems/5/bin/arm-rtems5-ar
> Checking for c flags '-MMD'               : yes
> Checking for cxx flags '-MMD'             : yes
> Compiler version (arm-rtems5-gcc)         : 7.5.0 20191114 (RTEMS 5, RSB 
> 5.1, Newlib 7947581)
> Checking for a valid RTEMS BSP installation : yes
> Checking for RTEMS_DEBUG                    : no
> Checking for RTEMS_MULTIPROCESSING          : no
> Checking for RTEMS_NEWLIB                   : yes
> Checking for RTEMS_POSIX_API                : yes
> Checking for RTEMS_SMP                      : no
> Checking for RTEMS_NETWORKING               : yes
> 'configure' finished successfully (1.056s)
> 
> 
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
> 


More information about the users mailing list