⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme

📁 专业汽车级嵌入式操作系统OSEK的源代码
💻
字号:
                  LibNXT and FwFlash                        v0.2                    David Anderson                 ====================What?=====LibNXT is setting out to be a full NXT control library for a hostcomputer to talk a Lego Mindstorms NXT intelligent brick.  Thisincludes: - Handling USB communication and locating the NXT in the USB tree, - Interaction with the Atmel AT91SAM boot assistant; especially: - Flashing of a firmware image to the NXTCurrently planned features: - Interaction with the official firmware (called NxtOS here) - Language bindings to various higher-level languages (C++, Perl,   Python, Java, Lua, ...)(If you have ideas of other stuff, please send it in!)LibNXT is targetted at the platforms that the official Lego MinstormsNXT software overlooks. Specifically, it will work on anyPOSIX-compliant operating system where libusb 0.1(http://libusb.sf.net/) is supported.The design of LibNXT is layered, meaning you can plug into it at anylevel of complexity or abstraction you desire, from the lowest levelUSB bulk bit-pushing interface, to an API exposing the SAM-BAcommandset, right up to just calling nxt_firmware_flash() and havingeverything taken care of!FwFlash is the first utility program that uses LibNXT. As its namehints, its purpose is to take a NXT firmware image file and flash itto a connected NXT device.Who?====Uh, that would be me. David Anderson, linux/open source developer andenthusiast, and an MDP participant :-).When?=====Started the day after receiving the NXT kit, I started by working outthe firmware flashing procedure from the specs and a USB dump of thewindows software at work. Since then, after obtaining aproof-of-concept application, I've been implementing this library toabstract the horrors of low-level USB chatter into a nice, cleanlibrary. - Release 0.2 (17/03/2006) : firmware flashing is now done entirely                with open source code. The flash driver routine has                been replaced with open source code implementing the                flashing procedure. - Release 0.1.1 (10/03/2006) : add big-endian host arch support, and                make the firmware image reading process a little less                linux-centric (use of the posix open/read/close API                instead of mmap). - Release 0.1 (10/03/2006) : featuring the FwFlash utility and a                LibNXT with just enough API in it to get FwFlash                working :-)How?====To compile all of this you'll need a copy of libusb 0.1 on yoursystem, as well as the scons project manager. - Libusb 0.1: http://libusb.sf.net/ - Scons: http://www.scons.org/When you have all that, just run 'scons' in the libnxt directory, andcompilation should follow. Once you're done, you can try fwflash outby resetting your NXT (see your user manual for details on this) andrunning:./fwflash nxtos.binnxtos.bin is the official Lego Mindstorms NXT firmware RC0, bundled inthis package for convenience. You can take the one on your currentinstallation of the Mindstorms software, they are the same file.If all goes well, fwflash should inform you that it has found the NXTon your USB device bus, and that flashing has started. After a fewseconds, it should announce successful flashing, and say that it hasbooted the new firmware, which should be answered by the greetingsound of NxtOS as the brick starts up :-).If it doesn't, well it's either a problem with your USB devicepermissions (if fwflash can't find the NXT), or it's a bug (if the brickdoesn't reboot properly, or if some weird error is reported by fwflashand it bombs out.The release tarball comes with a 'flash.bin'. This file is thecompiled version of the open onboard flash driver. If you want torebuild this file yourself, you'll need an ARM cross-compilingtoolchain, such as the one provided by the excellent Scratchboxproject (http://www.scratchbox.org/). Once you have it set up one wayor another, cd to the flash_write directory and type 'make' to producethe flash driver binary.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -