Actually I'm able to compile with waf, I just had to create another
file in Testsuites and added it to the script libbsd_waf.py in the
rtems-libbsd folder. Thanks Chris for the help.
But I prefer to develop in eclipse. With RTEMS(without bsd) I could do
it because the programs are imported from a Makefile, the new question
is:
Is it possible to compile without using waf and without calling the
rtems-libbbsd repository ("supposedly" I already have the necessary
files in rtems-4.12 when the command “waf install” copied them) using
only the rtems-4.12 folder that is generated after all installation
process?
Thanks in advance.
El 2017-08-09 23:16, Chris Johns escribió:
On 09/08/2017 21:13, mfg wrote:
Hello guys,
Thank you Chris for the reply, but I think I'm doing something wrong
before the
step that you describe to me.
I want to do my own program using the new bsp (I can use the
compiled examples
without problems (atleast dhcpcd01)) but when I try to compile there
are
unreference errors like
/home/marco/Desktop/Proyecto/prueba13/test_main.c:249: undefined
reference to
`rtems_bsd_setlogpriority'
/home/marco/Desktop/Proyecto/prueba13/test_main.c:276: undefined
reference to
`rtems_bsd_initialize'
o-optimize/test_main.o: In function `default_network_ifconfig_lo0':
/home/marco/Desktop/Proyecto/prueba13/test_main.c:79: undefined
reference to
`rtems_bsd_command_ifconfig'
I installed and configured the rtems-libbsd again but it's the same.
For example, the funtion ”tems_bsd_setlogpriority” is defined in
lane 250 of
bsd.h
(/arm-rtems4.12/xilinx_zynq_zedboard/lib/include/rtems/bsd/bsd.h) and
I
include that file in my program (#include <rtems/bsd/bsd.h>).
Is the bsp not enough?
You need to specify the libbsd librarie when linking. The 'rtems_waf'
package
contains 'rtems_bsp.py' which means you should be able to add an
import to your
waf script where you include 'rtems_waf.rtems':
import rtems_waf.rtems as rtems
import rtems_waf.rtems_bsp as rtems_bsd
If you look in the source for 'rtems_bsd.py' you will see extra
libraries are
added when linking. It has been a while since I used rtems_bsd.
By the way, I haven't a file named "rtems_bsd.py". Rtems_waf folder
contains the sources rtems.py, __init__.py and pkgconfig.py
I assumed in the last step of waf (waf install), all files that we
need are
copied:
+ install
/home/marco/Prueba-rtems-libbsp3/sandbox/rtems-4.12/arm-rtems4.12/xilinx_zynq_zedboard/lib/libbsd.a
(from build/arm-rtems4.12-xilinx_zynq_zedboard/libbsd.a)
+ install
/home/marco/Prueba-rtems-libbsp3/sandbox/rtems-4.12/arm-rtems4.12/xilinx_zynq_zedboard/lib/include/mghttpd/mongoose.h
(from rtemsbsd/mghttpd/mongoose.h)
+ install
/home/marco/Prueba-rtems-libbsp3/sandbox/rtems-4.12/arm-rtems4.12/xilinx_zynq_zedboard/lib/include/bsm/audit.h
(from freebsd/sys/bsm/audit.h)
...
Yes this is needed.
Do I have to copy manually something more from the rtems-libbsd
folder to bsp?
Maybe the makefile is wrong, do I need link the libbsd.a library?
How?
You can use 'rtems_bsd' as described above or you can add the library
to your
waf script. The excellent Waf Book can help:
https://waf.io/book/#_library_interaction_use
Look at the heading 'Fake libraries' and '10.3.3. Foreign libraries
and flags'
for more detail.
Chris
_______________________________________________
users mailing list
users@rtems.org
http://lists.rtems.org/mailman/listinfo/users