5 Assuming the BSP is the sparc erc32 BSP in:
6 /home/charles/quick-start/rtems/5/sparc-rtems5/erc32/
10 Set up environment variuables
12 export RTEMS_MAKEFILE_PATH=/home/charles/quick-start/rtems/5/sparc-rtems5/erc32/
13 export PATH=/home/charles/quick-start/rtems/5/bin/:$PATH
15 Now we can build and install the Yaffs library:
17 $cd /opt/y/git/yaffs2/rtems
19 $make -f Makefile.rtems clean
20 $make -f Makefile.rtems all
21 output is build-erc32/libyaffs2.a
22 $make -f Makefile.rtems install
23 mkdir -p /home/charles/quick-start/rtems/5/sparc-rtems5/erc32/lib/include/yaffs
24 install -m 644 build-erc32/libyaffs2.a /home/charles/quick-start/rtems/5/sparc-rtems5/erc32/lib
25 install -m 644 rtems_yaffs.h yportenv.h ydirectenv.h yaffs_osglue.h yaffs_hweight.h yaffscfg.h yaffs_list.h yaffsfs.h yaffs_guts.h yaffs_packedtags2.h yaffs_ecc.h /home/charles/quick-start/rtems/5/sparc-rtems5/erc32/lib/include/yaffs
28 Building test application
37 $ sparc-rtems5-sis hello_world_c/o-optimize/hello.exe
39 SIS - SPARC/RISCV instruction simulator 2.20, copyright Jiri Gaisler 2019
40 Bug-reports to jiri@gaisler.se
42 ERC32 emulation enabled
44 Loaded hello_world_c/o-optimize/hello.exe, entry 0x02000000
46 resuming at 0x02000000
49 *** HELLO WORLD TEST ***
51 *** END OF HELLO WORLD TEST ***
54 fatal source: 5 (RTEMS_FATAL_SOURCE_EXIT)
55 fatal code: 0 (0x00000000)
56 RTEMS version: 5.0.0.e22554535796fc29a7ed7c5e2338128e324a621d-modified
57 RTEMS tools: 7.5.0 20191114 (RTEMS 5, RSB 5 (599c4d7c87fa), Newlib d14714c69)
58 executing thread ID: 0x08a010001
59 executing thread name: UI1
60 cpu 0 in error mode (tt = 0x101)
61 125619 0200c0e0: 91d02000 ta 0x0
67 Open a second terminal to run sis in gdb mode
69 $ sparc-rtems5-sis -gdb
71 SIS - SPARC/RISCV instruction simulator 2.20, copyright Jiri Gaisler 2019
72 Bug-reports to jiri@gaisler.se
74 ERC32 emulation enabled
76 gdb: listening on port 1234 connected
80 *** HELLO WORLD TEST ***
82 *** END OF HELLO WORLD TEST ***
85 fatal source: 5 (RTEMS_FATAL_SOURCE_EXIT)
86 fatal code: 0 (0x00000000)
87 RTEMS version: 5.0.0.e22554535796fc29a7ed7c5e2338128e324a621d-modified
88 RTEMS tools: 7.5.0 20191114 (RTEMS 5, RSB 5 (599c4d7c87fa), Newlib d14714c69)
89 executing thread ID: 0x08a010001
90 executing thread name: UI1
97 From other window use gdb
101 $ sparc-rtems5-gdb hello.exe
103 Copyright (C) 2019 Free Software Foundation, Inc.
104 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
105 This is free software: you are free to change and redistribute it.
106 There is NO WARRANTY, to the extent permitted by law.
107 Type "show copying" and "show warranty" for details.
108 This GDB was configured as "--host=x86_64-linux-gnu --target=sparc-rtems5".
109 Type "show configuration" for configuration details.
110 For bug reporting instructions, please see:
111 <http://www.gnu.org/software/gdb/bugs/>.
112 Find the GDB manual and other documentation resources online at:
113 <http://www.gnu.org/software/gdb/documentation/>.
115 For help, type "help".
116 Type "apropos word" to search for commands related to "word"...
117 Reading symbols from hello.exe...
118 (gdb) target remote :1234
119 :1234: Connection timed out.
120 (gdb) target remote :1234
121 Remote debugging using :1234
124 Loading section .text, size 0x12880 lma 0x2000000
125 Loading section .rtemsroset, size 0x40 lma 0x2012880
126 Loading section .data, size 0x530 lma 0x20138c0
127 Start address 0x2000000, load size 77296
128 Transfer rate: 2434 KB/sec, 270 bytes/write.
132 Program received signal SIGTERM, Terminated.
133 syscall () at /home/charles/quick-start/src/rtems/c/src/../../cpukit/score/cpu/sparc/syscall.S:44
134 44 ta 0 ! syscall 1, halt with %g1,%g2,%g3 info