Python RAP and Reloc related for RTL
chrisj at rtems.org
Tue Aug 5 04:23:54 UTC 2014
On 4/08/2014 12:18 am, Peng Fan wrote:
> Create this new thread to talk about this topic and the reloc related.
> As you suggested, I have compiled toolchain for arm using option
> `-mlong-calls` on arm realview qemu platform, and now the python.rap
> file can be correctly loaded and python interpreter can run the xxx.py
> in startup like this `rap ld ./python-library.rap tmp a.py`.
Nice. How big is the RAP file ?
Having to use the '-mlong-calls' option is hack. I think we need to
teach the target code for ARM to add a veneer. Section 184.108.40.206 in
indicates this but does not seem to detail the process. I am not sure
how this is actually done or what we are required to do.
> A small hack should be done is about gcc search dirs. I'll try to fix
> this later.
What is the issue ? It would be good to have a record of it archived.
> Another issue is that, when python rap is loaded without and py file
> passed to it, it can not respond to input. The msg output is :
> RTEMS SHELL (Ver.1.0-FRC):/dev/console. Aug 3 2014. 'help' to list
> [/] # rap ld ./python-library.rap
> rtl: loading './python-library.rap'
> rtl: rap: input machine=0
> rtl: rap: machinetype=40
> rtl: rap: datatype=1
> rtl: rap: class=1
> rtl: rap: input header=12
> rtl: rap: load: symtab=16068 (1339) strtab=23867 relocs=0
> rtl: rap: input .text=32948
> rtl: rap: input .const=1088028
> rtl: rap: input .data=1233652
> rtl: rap: input symbols=1465241
> rtl: rap: input relocs=1505176
> Could not find platform independent libraries <prefix>
> Could not find platform dependent libraries <exec_prefix>
> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
> Python 2.7.8 (default, Aug 3 2014, 21:17:53)
> [GCC 4.8.3 20140522 (RTEMS
> 4.11-RSB-7c46699472b0d0adea2010f735722e2610c8c6ae-1, on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> It does not respond to input, any ideas about this?
This looks like a qemu or BSP issue. Python expects some site specific
python files. I cannot remember what this looks like for RTEMS. Maybe
the old ftp tarball I once uploaded will give you an idea.
If Python calling exit so halting the target ?
> 2. I have not tried on sparc sis, because it's memory is small. How to
> modify it's memory size in sis-gdb?
I seem to remember an option you can provide with 'target sim'. Maybe a
-? will provide some help.
More information about the devel