> Em 20/10/2011 10:50, Harold Hallikainen escreveu: >> Joining the conversation late... I agree that there is a need to know >> the >> details of the peripherals, but not necessarily the architecture of the >> CPU (CPU registers, etc.) in many cases. I grew up doing assembly >> (PDP-8, >> PDP-11, MC6800, then PIC16, PIC18). Since moving to PIC24 and PIC32, the >> only assembly I've had to deal with is for writing bootloaders. > > > My latest bootloader was written entirely in C, the closest to assembly > I went was using some "__builtin_tblrd", "__builtin_tblwt" and > "__builtin_write_NVM". > > > Isaac I include the bootloader within my project, so I need two sets of startup code, once for the bootloader itself (also written in C), and one for the application. I adapted fixed code (mostly setting up the stack pointer and related stuff) for the bootloader startup, then let the compiler and linker build the startup code for the application (and that startup code, which handles stack pointer and variable initialization, is in the application area). I know others do the bootloader and application as separate projects, then either bootload in the application or merge the flash images. Not the way I'm doing it, though. Thanks! Harold --=20 FCC Rules Updated Daily at http://www.hallikainen.com - Advertising opportunities available! --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .