Tham khảo tài liệu 'lego mindstorms - the unofficial guide to robots - jonathan b. knudsen part 11', kỹ thuật - công nghệ, cơ khí - chế tạo máy phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 190 legOS is more of a library than an OS in some ways. The programs you write are compiled with the legOS source code to produce a firmware. To run your program you need to download the whole thing to the RCX. This makes for a clumsy development cycle even though you re only changing your own code you need to recompile with legOS and download the whole firmware each time. pbFORTH by contrast is an interpreter. You only have to download it once to the RCX after that you can program it using a terminal emulator. As time passes someone will probably write a rudimentary set of tools so that you can leave legOS on the RCX and download new user programs to it. For now though no such facility exists. Figure 10-1 shows the architecture of legOS. On the PC side some kind of cross compiler compiles your code with the legOS code to produce a firmware. To get your program on the RCX you need to use a firmware downloader tool like nqc or firmdl. Once downloaded the firmware lives in the RAM of the RCX running whatever program you have created. Figure 10-1. legOS software architecture Development Tools You ll need some heavy-duty tools to work with legOS. There is another possibility as described in the sidebar An Innovative Alternative. The good news is that the tools are free. The basic tool you need is a cross compiler a tool that runs on one platform but produces executable files for another. In this case you want a cross compiler that runs on your PC and produces firmware for the RCX. 191 legOS is built using egcs the open-source successor to the GNU gcc compiler. To build legOS you ll also need GNU s binutils package. These tools are present on most Linux systems but they must be reconfigured to support crosscompilation for the RCX. I ll explain this process soon. If you re not running Linux don t despair. On a Unix-like operating system you can probably build egcs and binutils yourself or find someone who has binaries for your platform. See the Online Resources section .