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
31 $ cd rtems-y-test/basic-test
34 $ sparc-rtems5-sis o-optimize/yaffs-rtems-test.exe
36 SIS - SPARC/RISCV instruction simulator 2.20, copyright Jiri Gaisler 2019
37 Bug-reports to jiri@gaisler.se
39 ERC32 emulation enabled
41 Loaded o-optimize/yaffs-rtems-test.exe, entry 0x02000000
43 resuming at 0x02000000
45 Created simulated flash device 0x2d203c8
46 yaffs: 0 blocks to be sorted...
52 Open a second terminal to run sis in gdb mode
54 $ sparc-rtems5-sis -gdb
56 SIS - SPARC/RISCV instruction simulator 2.20, copyright Jiri Gaisler 2019
57 Bug-reports to jiri@gaisler.se
59 ERC32 emulation enabled
61 gdb: listening on port 1234 connected
65 *** HELLO WORLD TEST ***
67 *** END OF HELLO WORLD TEST ***
70 fatal source: 5 (RTEMS_FATAL_SOURCE_EXIT)
71 fatal code: 0 (0x00000000)
72 RTEMS version: 5.0.0.e22554535796fc29a7ed7c5e2338128e324a621d-modified
73 RTEMS tools: 7.5.0 20191114 (RTEMS 5, RSB 5 (599c4d7c87fa), Newlib d14714c69)
74 executing thread ID: 0x08a010001
75 executing thread name: UI1
82 From other window use gdb
86 $ sparc-rtems5-gdb hello.exe
88 Copyright (C) 2019 Free Software Foundation, Inc.
89 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
90 This is free software: you are free to change and redistribute it.
91 There is NO WARRANTY, to the extent permitted by law.
92 Type "show copying" and "show warranty" for details.
93 This GDB was configured as "--host=x86_64-linux-gnu --target=sparc-rtems5".
94 Type "show configuration" for configuration details.
95 For bug reporting instructions, please see:
96 <http://www.gnu.org/software/gdb/bugs/>.
97 Find the GDB manual and other documentation resources online at:
98 <http://www.gnu.org/software/gdb/documentation/>.
100 For help, type "help".
101 Type "apropos word" to search for commands related to "word"...
102 Reading symbols from hello.exe...
103 (gdb) target remote :1234
104 :1234: Connection timed out.
105 (gdb) target remote :1234
106 Remote debugging using :1234
109 Loading section .text, size 0x12880 lma 0x2000000
110 Loading section .rtemsroset, size 0x40 lma 0x2012880
111 Loading section .data, size 0x530 lma 0x20138c0
112 Start address 0x2000000, load size 77296
113 Transfer rate: 2434 KB/sec, 270 bytes/write.
117 Program received signal SIGTERM, Terminated.
118 syscall () at /home/charles/quick-start/src/rtems/c/src/../../cpukit/score/cpu/sparc/syscall.S:44
119 44 ta 0 ! syscall 1, halt with %g1,%g2,%g3 info