ARM学习报告003——Bios源码分析.doc

Size: px
Start display at page:

Download "ARM学习报告003——Bios源码分析.doc"

Transcription

1 ARM 003 Hayden Luo BIOS

2 Hayden Luo Bios BootLoader BIOS ARM Bootloader uclinux ARM ARM ARM ARM ARM ARM GNU ARM elf section ARM linux ARM 002 head.s Makefile bios.ld BIOS bios 003 Hayden Luo Bios bios-dyh Hayden Luo Bios Hayden Luo Bios bios Hayden Luo Bios bios-lt Hayden Luo Bios google liu tao bios-lt74 Hayden Luo Bios liu tao bios bios-lt74 Hayden Luo Bios bios-lt74 bios-dyh bios-lt74 BIOS

3 BIOS 1.1 BIOS bios 1 bios-dyh Hayden Luo Bios setup fdisk setup fdisk 1 bios-dyh

4 1 bios-dyh Makefile bios 1.2 Makefile /bios-dyh/makefile Makefile Linux Makefile all: all: make -C sysinit make -C biosapi make -C tftp make -C uart_rec make bios.bin make -C imgtools/param make -C imgtools/img Makefile 1 make 1 sysinit biosapi tftp uart_rec bin2c C C make bios.bin 1 C.o bios.ld bios objcopy section bios.bin 1 combine bios.bin imgtools/img bios.img bios.img ROM Bootloader BIOS BIOS bootloader bootloader BIOS 1 BIOS linux BIOS

5 BIOS BIOS 6 sysinit biosapi tftp urat_rec BIOS sysinit biosapi tftp urat_rec BIOS 2.1 BIOS sysinit biosapi tftp urat_rec Makefile.ld sysinit BIN2C CFLAGS += -I.. AFLAGS += -I.. =../tools/bin2c /sysinit/makefile OBJ = head.o sysinit.o all:../sysinit.c../sysinit.c: sysinit.bin $(BIN2C) -c -s sysinit_data sysinit.bin../sysinit.c sysinit.bin: sysinit $(OBJCOPY) -O binary --only-section=.init \ --only-section=.text \ --only-section=.rodata \ --only-section=.data \ --only-section=.bss sysinit \ sysinit.bin sysinit: $(OBJ) $(LD) -p -X -T sysinit.ld $(OBJ) \ -o sysinit clean: $(RM) -rf *.o sysinit sysinit.bin../sysinit.c %.o: %.c $(CC) $(CFLAGS) -c -o $@ $<

6 %.o: %.S $(CC) $(AFLAGS) -c -o $< /sysinit/makefile sysinit.s head.s sysinit sysinit.o GNU/linux BIOS ARM 002 GNU/linux 1 BIOS object CPU sysinit sysinit 0x03fe0000 sysinit PC 0x03fe0000 sysinit sysinit BIOS Makefile /sysinit/makefile sysinit.bin: sysinit $(OBJCOPY) -O binary --only-section=.init \ --only-section=.text \ --only-section=.rodata \ --only-section=.data \ --only-section=.bss sysinit \ sysinit.bin Makefile arm-elf-objcopy sysinit elf.init.text.rodata.data.bss ARM sysinit.bin elf elf elf.systab.syntab ARM sysinit.bin flash.text ro_base /sysinit.c: sysinit.bin $(BIN2C) -c -s sysinit_data sysinit.bin../sysinit.c bin2c sysinit.bin sysinit_data[] C C C unsigned char sysinit_data[] sysinit.bin ultraedit sysinit.bin sysinit.bin sysinit.c.o sysinit.o sysinit sysinit.o symbol table sysinit_data BIOS sysinit_data

7 sysinit.bin bios bios GNU/linux sysinit ld /sysinit/sysinit.ld OUTPUT_ARCH(arm) ENTRY(stext) SECTIONS {.text 0x03fe0000 : { /* Real text segment */ _text =.; /* Text and read-only data */ *(.text) *(.rodata). = ALIGN(4); _etext =.; /* End of text section */.data : { data_start =.; *(.data). = ALIGN(4); _edata =.;.bss : { bss_start =.; /* BSS */ *(.bss). = ALIGN(4); _end =.; 002.o sysinit head.o sysinit.o.o.c.s stext /sysinit/head.s head.s stext=0x03fe0000.text 0x03fe0000 ro_base 0x03fe0000 sysinit.bin 0x03fe0000 sysinit.bin 0x03fe0000 S3C4510B SRAM

8 .data.bss.text BIOS sysinit biosapi tftp urat_rec windows BIOS Bootloader bin2c bin BIOS BIOS bios-dyh Hayden Luo Bios BIOS BIOS biosapi tftp sysinit biosapi.text 0x data.bss tftp.text 0x data.bss sysinit 0x03fe0000 biosapi 0x tftp urat_rec 0x x bin2c+.bin 2.2 bios.bin bin2c c BIOS make bios.bin bios 1 make bios.bin Makefile OBJ = head.o bios.o gunzip.o utils.o console.o bioscall.o \ sysinit.o biosapi.o tftp.o uart_rec.o /Makefile bios.bin: bios $(OBJCOPY) -O binary \ --only-section=.init \ --only-section=.text \ --only-section=.rodata \ --only-section=.data \ --only-section=.bss bios bios.bin

9 bios: $(OBJ) $(LD) -p -X -T bios.ld $(OBJ) \ -o bios Makefile bios.bin bios section arm-elf-objcopy bios Makefile bios.o OBJ = head.o bios.o gunzip.o utils.o console.o bioscall.o sysinit.o biosapi.o tftp.o uart_rec.o 1.o.o arm-elf-gcc c 1 c c head.s bios_main bios.c c bios bios_main gunzip.c biosapi tftp utils.c bioscall.c biosapi console.c borad.h config.h ROM DRAM c.h gcc.o 1 rel<.section> symbol table.o.ld bios bios bootloader bios c arm-elf-gcc.o 1.o o.text.rodata.data.bss.rel<section>.symtab ld GNU ld.ld.o 002.text.rodata.data.bss RO RW ZI symbol table symbol table.o symbol symbol symbol.rel<section> bios SECTIONS {.text 0x : { /* Real text segment */ _text =.; /* Text and read-only data */ /Makefile

10 *(.text) *(.rodata). = ALIGN(4); _etext =.; /* End of text section */ bios 0x ro_base=0x Mbyte flash ARM 001 ro_base 0x flash 0x flash bios.img bios.bin bios flash 99% bios flash bios.img bios 0x S3C4510B ROMCON0 0x x ROM0 S3C4510B ROM0 ROM0 Flash flash 0x0 0x M ROMCON0 22 0:21 32bits 4M 32bit=4M words=16m bytes ROM0 32Mbytes ROMCON0 ROM0 16M 16M 0x

11 PC 0x M x0 PC 0x x0 ROM0 flash 1M 16 2M 20 ADDR[19:0] 2M ROM0 32M flsh ROM0 ADDR20 flash ADDR[19:0] 2M 4M 6M 8M 16M 18M 30M Bootloader bios 0x M BIOS 2.3 bios.img bios.bin flash /imgtools/img bios.img 1 bios bios.bin bios.img bios bios.bin bios.img bios elf flash 99 Bootloader elf.text.rodata.data.bss bios.bin bin flash BIOS bios.img flash param.tbl bootloader bios.bin 0xe000 bios.img 0xe000 bios 0 0xe000 param.tbl

12 BIOS config.h #define SYSTEM_TABLE_OFFSET 0x0000e000 /imgtools/param param.c param.tbl mbr.bin param.tbl /imgtools/param/param.c int main() { FILE *f; f = fopen("param.tbl", "wb"); fwrite((char *)(&system_table), 1, sizeof(struct system_table_struct), f); fclose(f); f = fopen("mbr.bin", "wb"); fwrite((char *)(&partition_table), 1, sizeof(struct partition_table_struct), f); fclose(f); return 0; param.c param.tbl mbr.bin system_table param.c struct system_table_struct system_table system_table system_table_struct BIOS param.tbl BIOS! Bios.img /imgtools/img/ /imgtools/img/makefile bios:../tools/combine../../bios.bin -a 0x7f00../param/param.tbl bios.img /imgtools/img/makefile Makefile bios.img tools combine bios.img bios.bin param.tbl param.tbl 0xe000 ultraedit param.tbl 0x7f00 bios 0x7f00 bios.img bios bios BIOS BIOS

13 BIOS BIOS BIOS. ARM Let s go!! 3.1 BIOS head.s BIOS linux Makefile Makefile OBJ = head.o bios.o gunzip.o utils.o console.o bioscall.o \ sysinit.o biosapi.o tftp.o uart_rec.o /Makefile bios: $(OBJ) $(LD) -p -X -T bios.ld $(OBJ) \ -o bios Makefile.o ADS head.o bios head.s head.o.text bios.text head.s head.s 002 head.s.globl stext.globl system_table_offset.globl _rom_base stext system_table_offset _rom_base system_table_offset:.long SYSTEM_TABLE_OFFSET SYSTEM_TABLE_OFFSET:.long stext SYSTEM_TABLE_OFFSET config.h param.tbl _rom_base head.s bios.img bios.img flash _rom_base ROM /* * Load up the linker defined values for the static data copy */ ldr r0, =_etext

14 ldr r1, = data_start ldr r3, =_edata ARM 002 _etext data_start _edata bios.ld head.s 002.data.bss twentyone bootloader bootloader RW rw_base RW.data ZI.bss cpsr ARM SVC stack cache bios bios_start: bl bios_main bios_main c bios Head.S bl bios_main twentyone /head.s mov r3, r0 r0 r3 r0 SYSCFG cache r3 /* * Call sys_init, it should never return. */ sys_start: /head.s mov pc, r3 r3 PC r3 r3 r0 r0 ATPCS r0 r0 bios_main() bios_main() bios.c return (unsigned char *)_rom_base; /bios.c BIOS bootloader head.s bl bios_main BIOS c bios_mian() bios.c c linux/gnu

15 bios.c 3.2 BIOS bios-dyh bios.c unsigned char *bios_main(void) { struct system_table_struct *system_table; /bios.c unsigned long startup_mode; int i, ch; system_table = (struct system_table_struct *)(_rom_base + system_table_offset); sys_init(system_table, _rom_base, DRAM_BASE); console_init(); printf("\r\n\r\n"); printf("compex BIOS for SAMSUNG S3C4510B v1.20 (build 0801)\r\n\r\n"); printf("modified by duyunhai for 'ARM study report 003'\r\n"); biosapi_init(); printf("\r\n"); startup_mode = bios_startup_mode(); if (startup_mode == BOOT_MENU) { startup_mode = menu(system_table); return (unsigned char *)_rom_base; //return to head.s with _rom_base in r0 bl bios_main bios bootloader struct system_table_struct system_table; /bios.c struct system_table_struct *system_table; struct system_table_struct bios.h struct system_table_struct { /bios.h

16 unsigned short vendor_id; unsigned short device_id; unsigned short sub_vendor_id; unsigned short sub_device_id; unsigned long rev; unsigned long bios_size; unsigned long system_table_size; unsigned long partition_table_offset; unsigned long partition_table_size; unsigned long sys_reg_base; unsigned long sys_clock; unsigned long ext_clock; struct sys_rom_cfg rom_table[6]; struct sys_dram_cfg dram_table[4]; unsigned long ext_base; struct sys_ext_cfg ext_table[4]; struct sys_iop_cfg iop; struct sys_uart_cfg uart[2]; struct sys_eth_cfg eth; struct sys_ne2000_cfg ne2000; struct sys_uart16550_cfg uart16550; struct sys_pc97338_cfg pc97338; unsigned long startup_mode; unsigned long tftp_ipaddr; ; BIOS rom_table,dram_table 2.2 param.tbl combine

17 BIOS param.tbl struct system_table_struct /imgtools/param/param.c 2.2 param.c bootloader /imgtools/param/param.c #define COMPEX_VENDOR_ID 0x11F6 #define IRE201_DEVICE_ID 0x8000 #define NP15B_DEVICE_ID 0x8001 #define BTE201_DEVICE_ID 0x8002 #define NONE_DEVICE_ID 0x0000 struct system_table_struct system_table = { bios_size: 0xc000, #ifdef IRE201 vendor_id: device_id: COMPEX_VENDOR_ID, IRE201_DEVICE_ID, sub_vendor_id: COMPEX_VENDOR_ID, sub_device_id: IRE201_DEVICE_ID, #endif #ifdef NP15B vendor_id: COMPEX_VENDOR_ID, device_id: NP15B_DEVICE_ID, sub_vendor_id: COMPEX_VENDOR_ID, sub_device_id: NP15B_DEVICE_ID, #endif #ifdef BTE201 vendor_id: device_id: COMPEX_VENDOR_ID, BTE201_DEVICE_ID, #endif sub_vendor_id: COMPEX_VENDOR_ID, sub_device_id: BTE201_DEVICE_ID, #ifdef SNDS100 vendor_id: device_id: COMPEX_VENDOR_ID, NONE_DEVICE_ID,

18 #endif sub_vendor_id: COMPEX_VENDOR_ID, sub_device_id: NONE_DEVICE_ID, rev: 0, sys_reg_base: sys_clock: ext_clock: 0x03ff0000, fmclk_mhz, 0xffffffff, #ifdef IRE201 rom_table: {{0x , 16, 0x , //rom0 is flash with 2M=1M*16bit {0x , 8, 0x , {0x , 8, 0x , {0x , 8, 0x , {0x , 8, 0x , {0x , 8, 0x , #endif dram_table: {{0x , 32, 0x , //sdram is 16M=4M*32bit #ifdef NP15B rom_table: {0x , 32, 0x , {0x , 32, 0x , {0x , 32, 0x , {{0x , 8, 0x , {0x , 8, 0x , {0x , 8, 0x , {0x , 8, 0x , {0x , 8, 0x , {0x , 8, 0x , #endif dram_table: #ifdef BTE201 rom_table: {{0x , 32, 0x , {0x , 32, 0x , {0x , 32, 0x , {0x , 32, 0x , {{0x , 8, 0x , {0x , 8, 0x , {0x , 8, 0x , {0x , 8, 0x , {0x , 8, 0x , {0x , 8, 0x ,

19 dram_table: #endif #ifdef SNDS100 rom_table: {{0x , 32, 0x , {0x , 32, 0x , {0x , 32, 0x , {0x , 32, 0x , {{0x , 8, 0x , {0x , 8, 0x , {0x , 8, 0x , {0x , 8, 0x , {0x , 8, 0x , {0x , 8, 0x , #endif dram_table: {{0x , 32, 0x , {0x , 32, 0x , {0x , 32, 0x , {0x , 32, 0x , system_table_size: sizeof(struct system_table_struct), partition_table_offset: partition_table_size: 0x0000f000, sizeof(struct partition_table_struct), ext_base: 0x03fd0000, ext_table: {{ 32, 0x00000fff, { 32, 0x00000fff, { 32, 0x00000fff, { 32, 0x00000fff, iop: {0x , 0x2ad00300, ~0x , uart: {{0x , 0, 0, 0, 0, 0, 0, {0x , 1, 0, 0, 0, 0, 0, eth: {0x , {0x00, 0x80, 0x48, 0x88, 0x00, 0x00, ne2000: {0x , 0, {0x00, 0x80, 0x48, 0x88, 0x00, 0x01, uart16550: {0x , 1, , pc97338: {0x , 1, ; startup_mode: tftp_ipaddr: BOOT_MENU, 0xd34156c0,//

20 4510b sys_reg_base rom_table dram_table iop uart eth tftp_ipaddr 4510b datasheet ROM SDRAM #ifdef IRE201 rom_table: {{0x , 16, 0x , {0x , 8, 0x , {0x , 8, 0x , {0x , 8, 0x , {0x , 8, 0x , {0x , 8, 0x , #endif dram_table: {{0x , 32, 0x , {0x , 32, 0x , {0x , 32, 0x , {0x , 32, 0x , BIOS IRE201 rom_table bios.h struct sys_rom_cfg { unsigned long size; unsigned long width; unsigned long flags; /bios.h ; size rom width flags flash 2M 16 flags datasheet 5 ROM BANK dram_table bios.h rom_table 16 SDRAM 32 SDRAM 16M 32 param.tbl /imgtools/param/param.c int main() /imgtools/param/param.c

21 { FILE *f; f = fopen("param.tbl", "wb"); fwrite((char *)(&system_table), 1, sizeof(struct system_table_struct), f); fclose(f); f = fopen("mbr.bin", "wb"); fwrite((char *)(&partition_table), 1, sizeof(struct partition_table_struct), f); fclose(f); return 0; /imgtools/param/param.c struct system_table_struct /bios.c system_table = (struct system_table_struct *)(_rom_base + system_table_offset); _rom_base + system_table_offset BIOS + _rom_base system_table_offset head.s system_table_offset:.long _rom_base:.long SYSTEM_TABLE_OFFSET stext /head.s system_table_offset SYSTEM_TABLE_OFFSET SYSTEM_TABLE_OFFSET config.h BIOS BIOS BIOS system_table sys_init(system_table, _rom_base, DRAM_BASE); bios.c sys_init( ) /bios.c /bios.c int sys_init(struct system_table_struct *system_table, unsigned long rom_base, unsigned long

22 dram_base) { typedef int (SYSINIT)(struct system_table_struct *, unsigned long, unsigned long); SYSINIT *sys_init_ptr; memcpy((char *)SRAM_BASE, sysinit_data, 1024 * 3); sys_init_ptr = (SYSINIT *)SRAM_BASE; sys_init_ptr(system_table, rom_base, dram_base); return 0; BIOS SDRAM DRAM_BASE system_table sysinit linux/gnu sysinit_data bios.c extern const unsigned char sysinit_data[]; sysinit_data[] sysinit.c sysinit_data sysinit.c sysinit_data[] sysinit sysinit.text 0x03FE0000 0x03FE0000 SRAM_BASE 4510b RAM SRAM sysinit_data[] SRAM_BASE bin2c sysinit BIOS sys_init_ptr sysinit 0x03FE0000 0x03FE0000 sys_init_ptr 0x03FE0000 sysinit sysinit sysinit.c BIOS 3.3 sysinit SRAM_BASE sysinit head.s.globl stext.section ".text" stext: b sys_init /sysinit/head.s

23 sysinit.c sys_init( ) system_table param.tbl extdbwth datasheet rom sdram ROM base = rom_base; for (i = 0; i < 6; i++) { sys_regs.romcon[i] = (system_table->rom_table[i].flags & ~0x3ffffc00) (((base + system_table->rom_table[i].size) & 0x03ff0000) << 4) ((base & 0x03ff0000) >> 6); base += system_table->rom_table[i].size; /sysinit/sysinit.c 6 romcon base system_table->rom_table[i].size base = rom_base; BIOS _rom_base=0x flash 16M system_table->rom_table[i].size system_table param.tbl datasheet rom ~0x3ffffc ROM Bank Next Pointer (((base + system_table->rom_table[i].size) & 0x03ff0000) << 4) 16 datasheet 64k 16 4 ((base + system_table->rom_table[i].size) & 0x03ff0000) ROM Bank Next Pointer ROM Bank Next Pointer SDRAM base = dram_base; /sysinit/sysinit.c

24 for (i = 0; i < 4; i++) { sys_regs.dramcon[i] = (system_table->dram_table[i].flags & ~0x3ffffc00) (((base + system_table->dram_table[i].size) & 0x03ff0000) << 4) ((base & 0x03ff0000) >> 6); base += system_table->dram_table[i].size; SDRAM ROM outl() outl(sys_regs.extdbwth, EXTDBWTH); outl(sys_regs.romcon[0], ROMCON0); outl(sys_regs.romcon[1], ROMCON1); outl(sys_regs.romcon[2], ROMCON2); outl(sys_regs.romcon[3], ROMCON3); outl(sys_regs.romcon[4], ROMCON4); outl(sys_regs.romcon[5], ROMCON5); outl(sys_regs.dramcon[0], DRAMCON0); outl(sys_regs.dramcon[1], DRAMCON1); outl(sys_regs.dramcon[2], DRAMCON2); outl(sys_regs.dramcon[3], DRAMCON3); outl(sys_regs.refextcon, REFEXTCON); /sysinit/sysinit.c outl() board.h #define VPchar *(volatile unsigned char *) #define outl(data, addr) (VPint(addr) = (data)) /board.h I/O 3.4 bios_main() sys_init(system_table, _rom_base, DRAM_BASE);

25 console_init(); /bios.c console.c int console_init(void) { outl(0x03, ULCON0); outl(0x09, UCON0); outl(0x1a0, UBRDIV0); //57600 N 8 /console.c return 0; console_init ULCON0 UCON0 UBRDIV0 0 datasheet printf printf console.c c 3.4 biosapi biosapi API bios API biosapi sysinit int biosapi_init(void) { unsigned char *inbuf; unsigned long insize; unsigned char *outbuf; unsigned long outsize; struct biosapi_init_struct init_param; BIOSCALL *fp; /bios.c inbuf = (unsigned char *)biosapi_data; outbuf = (unsigned char *)BIOS_API_ADDR; insize = 0x7fffffff; outsize = 0x7fffffff; gunzip(inbuf, &insize, outbuf, &outsize); init_param.rom_base = _rom_base;

26 init_param.dram_base = DRAM_BASE; init_param.system_table_offset = system_table_offset; fp = (BIOSCALL *)outbuf; return (*fp)(0, (unsigned long)&init_param); // Init BIOS call inbuf = (unsigned char *)biosapi_data; biosapi sysinit biosapi.c.ld Makefile outbuf = (unsigned char *)BIOS_API_ADDR; sysinit sysinit biosapi BIOS_API_ADDR config.h BIOS_API_ADDR biosapi.text biospai outbuf BIOS_API_ADDR gunzip(inbuf, &insize, outbuf, &outsize); outbuf biospai outbuf fp = (BIOSCALL *)outbuf; return (*fp)(0, (unsigned long)&init_param); /bios.c biosapi head.s biospai.globl stext.section ".text" stext: b bios_call_internal /biosapi/head.s biosapi biosapi.c bios_call_internal int bios_call_internal(unsigned long id, unsigned long arg) { switch (id) { case BIOSCALL_INIT: bios_call_init((struct biosapi_init_struct *)arg); break; /biosapi/biosapi.c

27 ID bios arg ID 0 BIOSCALL_INIT bios_call_init((struct biosapi_init_struct *)arg); bios_call_init config_table config_table system_table system_table config_table flash API bioscall.c bioscall.c API int bios_call(unsigned long id, unsigned long arg) { BIOSCALL *bios_call_ptr = (BIOSCALL *)BIOS_API_ADDR; return bios_call_ptr(id, arg); /bioscall.c bioscall.c bios_call() id arg BIOS biosapi BIOS_API_ADDR biosapi.c int bios_call_internal(unsigned long id, unsigned long arg) id. 3.5 BIOS bios_main() startup_mode = bios_startup_mode(); if (startup_mode == BOOT_MENU) { startup_mode = menu(system_table); return (unsigned char *)_rom_base; //return to head.s with _rom_base in r0 /bios.c Hayden Luo BIOS BIOS menu(system_table) BIOS > > menu bios-dyh /bios.c int menu(struct system_table_struct *system_table) { int select, partition_num = 0;

28 unsigned long input_data; unsigned long i; unsigned long linux_origin=0x ; while (1) { select = main_menu(system_table); if (select == BOOT_LOAD_FIRMWARE) { char*)(linux_origin+i); for(i=0;i<1024*1024*2;i++) { *(volatile unsigned char*)(0x8000+i)=*(volatile unsigned asm( " break; ); ldr r14, =0x ; mov PC, r14; " switch (select) { case BOOT_UPDATE_BIOS: load_tftp(select, partition_num); break; case BOOT_UPDATE_FIRMWARE: printf("sorry,this function is not complement\r\n\n\n"); break; case BOOT_LOAD_PROGRAM: { uart_receive(); break; case BOOT_BIOS_SETUP: printf("sorry,this function is not complement\r\n\n\n"); break; default: break;

29 return select; main_menu(system_table) bios-dyh BIOS uart_rec dram uart_rec BIOS sysinit tftp uclinux BOOT_LOAD_FIRMWARE image.ram flash flash 0x image 0x8000 0x8000 uclinux BOOT_UPDATE_BIOS tftp image.ram sdram 0x8000 ram BOOT_UPDATE_FIRMWARE bootloader bios-dyh BOOT_LOAD_PROGRAM sdram tftp V2.2 BOOT_BIOS_SETUP uclinux main_menu(system_table) 3.7 select tftp uart_rec switch (select) { /bios.c case BOOT_UPDATE_BIOS: load_tftp(select, partition_num); break; case BOOT_UPDATE_FIRMWARE: printf("sorry,this function is not complement\r\n\n\n"); break; case BOOT_LOAD_PROGRAM: { uart_receive();

30 break; case BOOT_BIOS_SETUP: printf("sorry,this function is not complement\r\n\n\n"); break; sysinit tftp twentyone tftp uart_rec BIOS V2.2 uclinux uclinux BIOS bootloader Hayden Luo Bios tftp twentyone ARM ARM ARM OPEN-JTAG ARM JTAG ARM ARM ARM OPEN-JTAG ARM ARM JTAG ARM JTAG OPEN-JTAG -

31 1 GNU/Linux ARM ARM 002 ARM 002 Object Object.o ARM 002 object elf object elf.rel<section name> section head.o.rel.text entry 1 relocation

32 1 readelf head.o rel.text elf object symbol table symbol table symbol table elf.symtab object symbol table head.o symol Symbol table Symbol table rel<.section>

33 2 readelf head.o symol table object.rel<section> symbol table.rel<section> symbol table symbol table.rel<section> symbol table 1 head.s bl bios_main bios.c bios_main head.o bios.o

34 head.o bios_main bios.o symbol table bios_main LD.o.o bios.o.o symol table symol table bios symol table.o symol table readelf a bios bios_main head.o bl bios_main 3 bios_main readelf bios symol table 2 bin2c c sysinit bin2c c sysinit

35 BIOS bin2c c * autogenerated file -- DO NOT EDIT! */ const unsigned char sysinit_data[]= { 0x1e, 0x00, 0x00, 0xea, 0x0d, 0xc0, 0xa0, 0xe1, 0x00, 0xd8, 0x2d, 0xe9, 0x04, 0xb0, 0x4c, 0xe2, 0x08, 0xd0, 0x4d, 0xe2, 0x10, 0x00, 0x0b, 0xe5, 0x10, 0x30, 0x1b, 0xe5, 0x10, 0x00, 0x53, 0xe3, /* Note: 1460 characters output */ /* end of file */ /sysinit.c sysinit_data[] bios.ld c bios sysinit.o object elf 4 readelf sysinit.o symol table

36 .o sysinit_data bios.c bios sysinit_data sysinit_data 5 5 readelf bios symol table

基于Hayden Luo Bios的BootLoader源代码级分析.doc

基于Hayden Luo Bios的BootLoader源代码级分析.doc Hayden Luo Bios BootLoader GNU tools ARM ARM 002 2004-5-12 ARM 001 MySComm4510b ARM ADS1.2 ADW ARM Windwos ARM linux uclinux linux Bootloader linux ARM linux GNU ARM linux 99 linux linux C++ gcc makefile

More information

华恒家庭网关方案

华恒家庭网关方案 LINUX V1.5 1 2 1 2 LINUX WINDOWS PC VC LINUX WINDOWS LINUX 90% GUI LINUX C 3 REDHAT 9 LINUX PC TFTP/NFS http://www.hhcn.com/chinese/embedlinux-res.html minicom NFS mount C HHARM9-EDU 1 LINUX HHARM9-EDU

More information

CC213

CC213 : (Ken-Yi Lee), E-mail: feis.tw@gmail.com 49 [P.51] C/C++ [P.52] [P.53] [P.55] (int) [P.57] (float/double) [P.58] printf scanf [P.59] [P.61] ( / ) [P.62] (char) [P.65] : +-*/% [P.67] : = [P.68] : ,

More information

Windows RTEMS 1 Danilliu MMI TCP/IP QEMU i386 QEMU ARM POWERPC i386 IPC PC104 uc/os-ii uc/os MMI TCP/IP i386 PORT Linux ecos Linux ecos ecos eco

Windows RTEMS 1 Danilliu MMI TCP/IP QEMU i386 QEMU ARM POWERPC i386 IPC PC104 uc/os-ii uc/os MMI TCP/IP i386 PORT Linux ecos Linux ecos ecos eco Windows RTEMS 1 Danilliu MMI TCP/IP 80486 QEMU i386 QEMU ARM POWERPC i386 IPC PC104 uc/os-ii uc/os MMI TCP/IP i386 PORT Linux ecos Linux ecos ecos ecos Email www.rtems.com RTEMS ecos RTEMS RTEMS Windows

More information

int *p int a 0x00C7 0x00C7 0x00C int I[2], *pi = &I[0]; pi++; char C[2], *pc = &C[0]; pc++; float F[2], *pf = &F[0]; pf++;

int *p int a 0x00C7 0x00C7 0x00C int I[2], *pi = &I[0]; pi++; char C[2], *pc = &C[0]; pc++; float F[2], *pf = &F[0]; pf++; Memory & Pointer trio@seu.edu.cn 2.1 2.1.1 1 int *p int a 0x00C7 0x00C7 0x00C7 2.1.2 2 int I[2], *pi = &I[0]; pi++; char C[2], *pc = &C[0]; pc++; float F[2], *pf = &F[0]; pf++; 2.1.3 1. 2. 3. 3 int A,

More information

ARM JTAG实时仿真器安装使用指南

ARM JTAG实时仿真器安装使用指南 ARM JTAG Version 1.31 2003. 11. 12 ARM JTAG ARM JTAG.3 ARM 2.1.4 2.2.4 ARM JTAG 3.1 18 3.2 18 3.2.1 Multi-ICE Server.18 3.2.2 ADS..21 ARM JTAG 4.1 Multi-ICE Server 33 4.1.1 Multi-ICE Server..... 33 4.1.2

More information

C/C++ - 文件IO

C/C++ - 文件IO C/C++ IO Table of contents 1. 2. 3. 4. 1 C ASCII ASCII ASCII 2 10000 00100111 00010000 31H, 30H, 30H, 30H, 30H 1, 0, 0, 0, 0 ASCII 3 4 5 UNIX ANSI C 5 FILE FILE 6 stdio.h typedef struct { int level ;

More information

NEXT SDT2.51 C:\ARM251 SDT2.51 ARM SDT 2.51 ARM PROJECT MANAGER SDT 2

NEXT SDT2.51 C:\ARM251 SDT2.51 ARM SDT 2.51 ARM PROJECT MANAGER SDT 2 S3C44B0 SDT DRAGNBOY MICROSTAR ARM 51 ARM S3C44B0 ARM SDT2.51 IAR ADS SDT2.51 S3C44B0 LEDTEST SDT ARM 1 2 SDT embed.8800.org SDT2.51 SDT2.51 ARM ARM CPU ARM SDT ADS ADS MULTI-ICE SDT JTAG JTAG SDT SDT2.51

More information

C语言的应用.PDF

C语言的应用.PDF AVR C 9 1 AVR C IAR C, *.HEX, C,,! C, > 9.1 AVR C MCU,, AVR?! IAR AVR / IAR 32 ALU 1KBytes - 8MBytes (SPM ) 16 MBytes C C *var1, *var2; *var1++ = *--var2; AVR C 9 2 LD R16,-X ST Z+,R16 Auto (local

More information

Microsoft Word - 正文.doc

Microsoft Word - 正文.doc 1 2 1 2 3 4 5 6 7 8 9 10 3 1 150 2 150 1 1 1.1 1.1.1 1.2 1.2.1 1.2.2 1.2.3 1.3 1.3.1 1.3.2 1.4 1.4.1 CPU 1.4.2 I/O 1.4.3 I/O 1.5 1.5.1 CISC RISC 1.5.2 1.5.3 1.6 1.6.1 1.6.2 N 1.6.3 2 2.1 2.1.1 2.1.2 2.1.3

More information

Abstract arm linux tool-chain root NET-Start! 2

Abstract arm linux tool-chain root NET-Start! 2 Lab III - Embedding Linux 1 Abstract arm linux tool-chain root NET-Start! 2 Part 1.4 Step1. tool-chain 4 Step2. PATH 4 Part 2 kernel 5 Step1. 5 Step2... 6 Step3...8 Part 3 root. 8 Step1. 8 Step2. 8 Part

More information

FY.DOC

FY.DOC 高 职 高 专 21 世 纪 规 划 教 材 C++ 程 序 设 计 邓 振 杰 主 编 贾 振 华 孟 庆 敏 副 主 编 人 民 邮 电 出 版 社 内 容 提 要 本 书 系 统 地 介 绍 C++ 语 言 的 基 本 概 念 基 本 语 法 和 编 程 方 法, 深 入 浅 出 地 讲 述 C++ 语 言 面 向 对 象 的 重 要 特 征 : 类 和 对 象 抽 象 封 装 继 承 等 主

More information

目录

目录 ALTERA_CPLD... 3 11SY_03091... 3 12SY_03091...4....5 21 5 22...8 23..10 24..12 25..13..17 3 1EPM7128SLC.......17 3 2EPM7032SLC.......18 33HT46R47......19..20 41..20 42. 43..26..27 5151DEMO I/O...27 52A/D89C51...28

More information

新版 明解C言語入門編

新版 明解C言語入門編 328, 4, 110, 189, 103, 11... 318. 274 6 ; 10 ; 5? 48 & & 228! 61!= 42 ^= 66 _ 82 /= 66 /* 3 / 19 ~ 164 OR 53 OR 164 = 66 ( ) 115 ( ) 31 ^ OR 164 [] 89, 241 [] 324 + + 4, 19, 241 + + 22 ++ 67 ++ 73 += 66

More information

新・解きながら学ぶC言語

新・解きながら学ぶC言語 330!... 67!=... 42 "... 215 " "... 6, 77, 222 #define... 114, 194 #include... 145 %... 21 %... 21 %%... 21 %f... 26 %ld... 162 %lf... 26 %lu... 162 %o... 180 %p... 248 %s... 223, 224 %u... 162 %x... 180

More information

51 C 51 isp 10 C PCB C C C C KEIL

51 C 51 isp 10   C   PCB C C C C KEIL http://wwwispdowncom 51 C " + + " 51 AT89S51 In-System-Programming ISP 10 io 244 CPLD ATMEL PIC CPLD/FPGA ARM9 ISP http://wwwispdowncom/showoneproductasp?productid=15 51 C C C C C ispdown http://wwwispdowncom

More information

C PICC C++ C++ C C #include<pic.h> C static volatile unsigned char 0x01; static volatile unsigned char 0x02; static volatile unsigned cha

C PICC C++ C++ C C #include<pic.h> C static volatile unsigned char 0x01; static volatile unsigned char 0x02; static volatile unsigned cha CYPOK CYPOK 1 UltraEdit Project-->Install Language Tool: Language Suite----->hi-tech picc Tool Name ---->PICC Compiler Executable ---->c:hi-picinpicc.exe ( Command-line Project-->New Project-->File Name--->myc

More information

1 Project New Project 1 2 Windows 1 3 N C test Windows uv2 KEIL uvision2 1 2 New Project Ateml AT89C AT89C51 3 KEIL Demo C C File

1 Project New Project 1 2 Windows 1 3 N C test Windows uv2 KEIL uvision2 1 2 New Project Ateml AT89C AT89C51 3 KEIL Demo C C File 51 C 51 51 C C C C C C * 2003-3-30 pnzwzw@163.com C C C C KEIL uvision2 MCS51 PLM C VC++ 51 KEIL51 KEIL51 KEIL51 KEIL 2K DEMO C KEIL KEIL51 P 1 1 1 1-1 - 1 Project New Project 1 2 Windows 1 3 N C test

More information

+00DE _01EN.book

+00DE _01EN.book TCS-NET MODBUS TCS-NET Modbus TCB-IFMB640TLE 1...... 2 2 RS 485... 3 3... 3 4... 4 5... 4 6... 5 7... 6 8... 16 TCS-NET Modbus 1 http://www.modbus-ida.org/ >=3.5 8 8 N*8 ( N = 252.) 16 >= 3.5 Modbus-Master

More information

untitled

untitled 8086/8088 CIP /. 2004.8 ISBN 7-03-014239-X.... TP313 CIP 2004 086019 16 100717 http://www.sciencep.com * 2004 8 2004 8 1 5 500 787 1092 1/16 16 1/2 391 000 1 2 ii 1 2 CAI CAI 3 To the teacher To the student

More information

6 C51 ANSI C Turbo C C51 Turbo C C51 C51 C51 C51 C51 C51 C51 C51 C C C51 C51 ANSI C MCS-51 C51 ANSI C C C51 bit Byte bit sbit

6 C51 ANSI C Turbo C C51 Turbo C C51 C51 C51 C51 C51 C51 C51 C51 C C C51 C51 ANSI C MCS-51 C51 ANSI C C C51 bit Byte bit sbit 6 C51 ANSI C Turbo C C51 Turbo C C51 C51 C51 C51 C51 C51 C51 C51 C51 6.1 C51 6.1.1 C51 C51 ANSI C MCS-51 C51 ANSI C C51 6.1 6.1 C51 bit Byte bit sbit 1 0 1 unsigned char 8 1 0 255 Signed char 8 11 128

More information

目 录

目 录 1 Quick51...1 1.1 SmartSOPC Quick51...1 1.2 Quick51...1 1.3 Quick51...2 2 Keil C51 Quick51...4 2.1 Keil C51...4 2.2 Keil C51...4 2.3 1 Keil C51...4 2.4 Flash Magic...9 2.5 ISP...9 2.6...10 2.7 Keil C51...12

More information

Simulator By SunLingxi 2003

Simulator By SunLingxi 2003 Simulator By SunLingxi sunlingxi@sina.com 2003 windows 2000 Tornado ping ping 1. Tornado Full Simulator...3 2....3 3. ping...6 4. Tornado Simulator BSP...6 5. VxWorks simpc...7 6. simulator...7 7. simulator

More information

新・明解C言語入門編『索引』

新・明解C言語入門編『索引』 !... 75!=... 48 "... 234 " "... 9, 84, 240 #define... 118, 213 #include... 148 %... 23 %... 23, 24 %%... 23 %d... 4 %f... 29 %ld... 177 %lf... 31 %lu... 177 %o... 196 %p... 262 %s... 242, 244 %u... 177

More information

1 LINUX IDE Emacs gcc gdb Emacs + gcc + gdb IDE Emacs IDE C Emacs Emacs IDE ICE Integrated Computing Environment Emacs Unix Linux Emacs Emacs Emacs Un

1 LINUX IDE Emacs gcc gdb Emacs + gcc + gdb IDE Emacs IDE C Emacs Emacs IDE ICE Integrated Computing Environment Emacs Unix Linux Emacs Emacs Emacs Un Linux C July 27, 2016 Contents 1 Linux IDE 1 2 GCC 3 2.1 hello.c hello.exe........................... 5 2.2............................... 9 2.2.1 -Wall................................ 9 2.2.2 -E..................................

More information

3 PCI PCI PCI type 0 PCI type 1 PCI type 2 PCI CardBus PCI 16 6 Device ID Vendor ID 00h Status Register Command Register 04h Class Code Revision ID 08

3 PCI PCI PCI type 0 PCI type 1 PCI type 2 PCI CardBus PCI 16 6 Device ID Vendor ID 00h Status Register Command Register 04h Class Code Revision ID 08 3 PCI PCI PCI type 0 PCI type 1 PCI type 2 PCI CardBus PCI 16 6 Device ID Vendor ID 00h Status Register Command Register 04h Class Code Revision ID 08h BIST Header Type Latency Timer Cache Line Size 0ch

More information

untitled

untitled MODBUS 1 MODBUS...1 1...4 1.1...4 1.2...4 1.3...4 1.4... 2...5 2.1...5 2.2...5 3...6 3.1 OPENSERIAL...6 3.2 CLOSESERIAL...8 3.3 RDMULTIBIT...8 3.4 RDMULTIWORD...9 3.5 WRTONEBIT...11 3.6 WRTONEWORD...12

More information

EK-STM32F

EK-STM32F STMEVKIT-STM32F10xx8 软 件 开 发 入 门 指 南 目 录 1 EWARM 安 装... 1 1.1 第 一 步 : 在 线 注 册... 1 1.2 第 二 步 : 下 载 软 件... 2 1.3 第 三 步 : 安 装 EWARM... 3 2 基 于 STMEVKIT-STM32F10xx8 的 示 例 代 码 运 行... 6 2.1 GPIO Demo... 6 2.2

More information

概述

概述 OPC Version 1.6 build 0910 KOSRDK Knight OPC Server Rapid Development Toolkits Knight Workgroup, eehoo Technology 2002-9 OPC 1...4 2 API...5 2.1...5 2.2...5 2.2.1 KOS_Init...5 2.2.2 KOS_InitB...5 2.2.3

More information

_汪_文前新ok[3.1].doc

_汪_文前新ok[3.1].doc 普 通 高 校 本 科 计 算 机 专 业 特 色 教 材 精 选 四 川 大 学 计 算 机 学 院 国 家 示 范 性 软 件 学 院 精 品 课 程 基 金 青 年 基 金 资 助 项 目 C 语 言 程 序 设 计 (C99 版 ) 陈 良 银 游 洪 跃 李 旭 伟 主 编 李 志 蜀 唐 宁 九 李 涛 主 审 清 华 大 学 出 版 社 北 京 i 内 容 简 介 本 教 材 面 向

More information

C/C++程序设计 - 字符串与格式化输入/输出

C/C++程序设计 - 字符串与格式化输入/输出 C/C++ / Table of contents 1. 2. 3. 4. 1 i # include # include // density of human body : 1. 04 e3 kg / m ^3 # define DENSITY 1. 04 e3 int main ( void ) { float weight, volume ; int

More information

ESP-Jumpstart

ESP-Jumpstart 2016-2019 2019 08 08 Contents 1 3 1.1 ESP32.............................. 3 1.2.................................................. 5 2 7 2.1............................................. 7 2.2 ESP-IDF............................................

More information

ebook50-15

ebook50-15 15 82 C / C + + Developer Studio M F C C C + + 83 C / C + + M F C D L L D L L 84 M F C MFC DLL M F C 85 MFC DLL 15.1 82 C/C++ C C + + D L L M F C M F C 84 Developer Studio S t u d i o 292 C _ c p l u s

More information

(Load Project) (Save Project) (OffLine Mode) (Help) Intel Hex Motor

(Load Project) (Save Project) (OffLine Mode) (Help) Intel Hex Motor 1 4.1.1.1 (Load) 14 1.1 1 4.1.1.2 (Save) 14 1.1.1 1 4.1.2 (Buffer) 16 1.1.2 1 4.1.3 (Device) 16 1.1.3 1 4.1.3.1 (Select Device) 16 2 4.1.3.2 (Device Info) 16 2.1 2 4.1.3.3 (Adapter) 17 2.1.1 CD-ROM 2 4.1.4

More information

C/C++ - 字符输入输出和字符确认

C/C++ - 字符输入输出和字符确认 C/C++ Table of contents 1. 2. getchar() putchar() 3. (Buffer) 4. 5. 6. 7. 8. 1 2 3 1 // pseudo code 2 read a character 3 while there is more input 4 increment character count 5 if a line has been read,

More information

陕西职业技术学院(用标志)

陕西职业技术学院(用标志) 计 算 机 应 用 技 术 专 业 人 才 培 养 方 案 (2015 级 ) 二 〇 一 五 年 八 月 目 录 第 一 部 分 主 体 部 分...1 一 专 业 名 称 及 代 码...1 二 招 生 对 象...1 三 学 制 与 学 历...1 四 培 养 目 标...1 五 职 业 岗 位...1 六 培 养 规 格...1 七 职 业 资 格 证 书 与 技 能 等 级 证 书 要 求...3

More information

an153f

an153f 153 2016 1 Linduino Michael Jones (PSM) LTpowerPlay (BMC) PSM PSM PMBus PMBus SMBus SMBus I2C PSM BMC Linduino (API) PSM Linduino PSM BMC BMC Robust PMBus System Software for the LTC3880) I 2 C / SMBus

More information

学习MSP430单片机推荐参考书

学习MSP430单片机推荐参考书 MSP430 16 MSP430 C MSP430 C MSP430 FLASH 16 1 CPU 16 ALU 16 PC SP SR R4~R15 2 3 00-FFH 100-1FFH 4 5 1 2 51 24 27 6 1 2 3 4 5 6 4 12 SR SP SR CPU SR CPU C Z N GIE CPUOff CPU OscOff SCG0 SCG1 CPU EXIT SP

More information

C/C++ - 函数

C/C++ - 函数 C/C++ Table of contents 1. 2. 3. & 4. 5. 1 2 3 # include # define SIZE 50 int main ( void ) { float list [ SIZE ]; readlist (list, SIZE ); sort (list, SIZE ); average (list, SIZE ); bargragh

More information

PIC16F F MPLAB 08 16F LED 15 LED

PIC16F F MPLAB 08 16F LED 15 LED PIC16F877 PIC16F877 03 16F877 05 06 MPLAB 08 16F877 13 LED 15 LED 17 20 24 2 PIC16F877 PIC16F877 DIP VDD VSS CLOCK CPU :,AND,OR,XOR ROM: CPU ROM RAM: CPU,CPU I/O:CPU, CPU,, 16F877 RAM 512 128 Bank Bank

More information

第8章

第8章 ARM S3C4510B 8 ARM ADS ARM ADS(ARM Developer Suite) CodeWarrior IDE ADS AXD ADS ADS AXD 8.1 ADS ARM ADS ARM Developer Suite ARM ARM ADS 1.2 ADS1.1 ADS1.0 Windows NT4 Windows 2000 Windows 98 Windows 95

More information

untitled

untitled 1 Outline 數 料 數 數 列 亂數 練 數 數 數 來 數 數 來 數 料 利 料 來 數 A-Z a-z _ () 不 數 0-9 數 不 數 SCHOOL School school 數 讀 school_name schoolname 易 不 C# my name 7_eleven B&Q new C# (1) public protected private params override

More information

C/C++语言 - C/C++数据

C/C++语言 - C/C++数据 C/C++ C/C++ Table of contents 1. 2. 3. 4. char 5. 1 C = 5 (F 32). 9 F C 2 1 // fal2cel. c: Convert Fah temperature to Cel temperature 2 # include < stdio.h> 3 int main ( void ) 4 { 5 float fah, cel ;

More information

( CIP) /. :, ( ) ISBN TP CIP ( 2005) : : : : * : : 174 ( A ) : : ( 023) : ( 023)

( CIP) /. :, ( ) ISBN TP CIP ( 2005) : : : : * : : 174 ( A ) : : ( 023) : ( 023) ( CIP) /. :, 2005. 2 ( ) ISBN 7-5624-3339-9.......... TP311. 1 CIP ( 2005) 011794 : : : : * : : 174 ( A ) :400030 : ( 023) 65102378 65105781 : ( 023) 65103686 65105565 : http: / /www. cqup. com. cn : fxk@cqup.

More information

新版 明解C++入門編

新版 明解C++入門編 511!... 43, 85!=... 42 "... 118 " "... 337 " "... 8, 290 #... 71 #... 413 #define... 128, 236, 413 #endif... 412 #ifndef... 412 #if... 412 #include... 6, 337 #undef... 413 %... 23, 27 %=... 97 &... 243,

More information

科学计算的语言-FORTRAN95

科学计算的语言-FORTRAN95 科 学 计 算 的 语 言 -FORTRAN95 目 录 第 一 篇 闲 话 第 1 章 目 的 是 计 算 第 2 章 FORTRAN95 如 何 描 述 计 算 第 3 章 FORTRAN 的 编 译 系 统 第 二 篇 计 算 的 叙 述 第 4 章 FORTRAN95 语 言 的 形 貌 第 5 章 准 备 数 据 第 6 章 构 造 数 据 第 7 章 声 明 数 据 第 8 章 构 造

More information

untitled

untitled niosii H:\DB2005\project\niosDK\Example\NiosSmall QuartusII4.2 File -> New Project Wizard Diectory,Name,Top-Level Entity Add Files EDA Tools Setting Finish, OK H:\DB2005\project\niosDK\Example\NiosSmall

More information

1

1 SDT Uclinux SDT.alf.c 44blib.alf 44blib.c jtag ADS.alf.c make menuconfig make dep make clean make lib_only make user_only make romfs make image make uclinux ext2 cash lcd frambuffer 1 armsys-c uclinux

More information

untitled

untitled Lwip Swedish Institute of Computer Science February 20, 2001 Adam Dunkels adam@sics.se (QQ: 10205001) (QQ: 329147) (QQ:3232253) (QQ:3232253) QQ ARM TCPIP LCD10988210 LWIP TCP/IP LWIP LWIP lwip API lwip

More information

bingdian001.com

bingdian001.com TSM12M TSM12 STM8L152C6, STM8L152R8 MSP430F5325 whym1987@126.com! /******************************************************************************* * : TSM12.c * : * : 2013/10/21 * : TSM12, STM8L f(sysclk)

More information

プログラムの設計と実現II

プログラムの設計と実現II UNIX C ls mkdir man http://www.tj.chiba-u.jp/lecture/prog2/ Ctrl+x, Ctrl+s ( )..[4]% gcc Wall o hoge hoge.c..[5]%./hoge 1 : 1 2 : 2 3 : 3 4 : 0 6..[6]% (! )..[4]% gcc Wall o hoge hoge.c..[5]%!g gcc Wall

More information

TwinCAT 1. TwinCAT TwinCAT PLC PLC IEC TwinCAT TwinCAT Masc

TwinCAT 1. TwinCAT TwinCAT PLC PLC IEC TwinCAT TwinCAT Masc TwinCAT 2001.12.11 TwinCAT 1. TwinCAT... 3 2.... 4... 4...11 3. TwinCAT PLC... 13... 13 PLC IEC 61131-3... 14 4. TwinCAT... 17... 17 5. TwinCAT... 18... 18 6.... 19 Maschine.pro... 19... 27 7.... 31...

More information

ebook8-30

ebook8-30 3 0 C C C C C C++ C + + C++ GNU C/C++ GNU egcs UNIX shell s h e l l g a w k P e r l U N I X I / O UNIX shell awk P e r l U N I X C C C C C C U N I X 30.1 C C U N I X 70 C C U N I X U N I X U N I X C Dennis

More information

Oracle Solaris Studio makefile C C++ Fortran IDE Solaris Linux C/C++/Fortran IDE "Project Properties" IDE makefile 1.

Oracle Solaris Studio makefile C C++ Fortran IDE Solaris Linux C/C++/Fortran IDE Project Properties IDE makefile 1. Oracle Solaris Studio 12.2 IDE 2010 9 2 8 9 10 11 13 20 26 28 30 32 33 Oracle Solaris Studio makefile C C++ Fortran IDE Solaris Linux C/C++/Fortran IDE "Project Properties" IDE makefile 1. "File" > "New

More information

Outline USB Application Requirements Variable Definition Communications Code for VB Code for Keil C Practice

Outline USB Application Requirements Variable Definition Communications Code for VB Code for Keil C Practice 路 ESW 聯 USB Chapter 9 Applications For Windows Outline USB Application Requirements Variable Definition Communications Code for VB Code for Keil C Practice USB I/O USB / USB 3 料 2 1 3 路 USB / 列 料 料 料 LED

More information

untitled

untitled A, 3+A printf( ABCDEF ) 3+ printf( ABCDEF ) 2.1 C++ main main main) * ( ) ( ) [ ].* ->* ()[] [][] ** *& char (f)(int); ( ) (f) (f) f (int) f int char f char f(int) (f) char (*f)(int); (*f) (int) (

More information

<4D F736F F D D342DA57CA7DEA447B14D2DA475B57BBB50BADEB27AC3FEB14DA447B8D5C344>

<4D F736F F D D342DA57CA7DEA447B14D2DA475B57BBB50BADEB27AC3FEB14DA447B8D5C344> 1. 請 問 誰 提 出 積 體 電 路 (IC) 上 可 容 納 的 電 晶 體 數 目, 約 每 隔 24 個 月 (1975 年 更 改 為 18 個 月 ) 便 會 增 加 一 倍, 效 能 也 將 提 升 一 倍, 也 揭 示 了 資 訊 科 技 進 步 的 速 度? (A) 英 特 爾 (Intel) 公 司 創 始 人 戈 登. 摩 爾 (Gordon Moore) (B) 微 軟 (Microsoft)

More information

Microsoft PowerPoint - ds-1.ppt [兼容模式]

Microsoft PowerPoint - ds-1.ppt [兼容模式] http://jwc..edu.cn/jxgl/ HomePage/Default.asp 2 说 明 总 学 时 : 72( 学 时 )= 56( 课 时 )+ 16( 实 验 ) 行 课 时 间 : 第 1 ~14 周 周 学 时 : 平 均 每 周 4 学 时 上 机 安 排 待 定 考 试 时 间 : 课 程 束 第 8 11 12 章 的 内 容 为 自 学 内 容 ; 目 录 中 标 有

More information

untitled

untitled www.mcudriver.cn 1.1 / 1) WinAVR20070525 2) Source Insight 3) ISP 4) PonyProg ISP 5) USB 6) 1.2. MCU ATMEGA16 1.3. AVR8 1.4 LED0~LED7 1 1.5 #include // Program 1.1 LED.C #define uchar unsigned

More information

How to Debug Tuxedo Server printf( Input data is: %s, inputstr); fprintf(stdout, Input data is %s, inputstr); fprintf(stderr, Input data is %s, inputstr); printf( Return data is: %s, outputstr); tpreturn(tpsuccess,

More information

untitled

untitled 不 料 料 例 : ( 料 ) 串 度 8 年 數 串 度 4 串 度 數 數 9- ( ) 利 數 struct { ; ; 數 struct 數 ; 9-2 數 利 數 C struct 數 ; C++ 數 ; struct 省略 9-3 例 ( 料 例 ) struct people{ char name[]; int age; char address[4]; char phone[]; int

More information

<C4DACEC42E696E6464>

<C4DACEC42E696E6464> 1 要 闻 报 道 认 真 打 造 协 会 精 品 品 牌, 充 分 发 挥 老 教 授 们 的 积 极 作 用 中 国 老 教 授 协 会 今 年 第 二 季 度 连 续 举 办 三 个 专 家 论 坛 本 刊 讯 按 照 2009 年 1 月 12 日 中 国 老 教 授 协 会 六 届 五 次 常 务 理 事 会 通 过 的 协 会 2009 年 工 作 要 点, 协 会 与 有 关 单 位

More information

Microsoft Word - 39.doc

Microsoft Word - 39.doc 摘 基 于 ARM 的 嵌 入 式 无 线 AP 的 设 计 杨 健 陈 永 泰 ( 武 汉 理 工 大 学 信 息 工 程 学 院, 武 汉 430070) 要 : 本 文 首 先 介 绍 了 无 线 AP 的 基 本 原 理, 然 后 重 点 描 述 基 于 AT76C510 的 无 线 AP 的 硬 件 设 计 及 嵌 入 式 系 统 uclinux 最 后 对 IEEE802.11b 的 安

More information

static struct file_operations gpio_ctl_fops={ ioctl: gpio_ctl_ioctl, open : gpio_open, release: gpio_release, ; #defineled1_on() (GPBDAT &= ~0x1) #def

static struct file_operations gpio_ctl_fops={ ioctl: gpio_ctl_ioctl, open : gpio_open, release: gpio_release, ; #defineled1_on() (GPBDAT &= ~0x1) #def Kaise s 2410 Board setting [1]. Device Driver Device Driver Linux s Kernel ARM s kernel s3c2410_kernel2.4.18_r1.1_change.tar.bz2 /usr/src (1) #cd /usr/src (2) #tar xfj s3c2410_kernel2.4.18_r1.1_change.tar.bz2

More information

C 1

C 1 C homepage: xpzhangme 2018 5 30 C 1 C min(x, y) double C // min c # include # include double min ( double x, double y); int main ( int argc, char * argv []) { double x, y; if( argc!=

More information

Cygwin Cygwin windows Linux Cygwin.dll Windows Linux API Linux Windows Linux 2

Cygwin Cygwin windows Linux Cygwin.dll Windows Linux API Linux Windows Linux 2 uclinux 1 Cygwin Cygwin windows Linux Cygwin.dll Windows Linux API Linux Windows Linux 2 Cygwin Cygwin GNU gccgdbxfree86bashtetexopengl perlpython Linux Windows Cygwin Linux GNU Windows 3 Cygwin Cygwin

More information

c_cpp

c_cpp C C++ C C++ C++ (object oriented) C C++.cpp C C++ C C++ : for (int i=0;i

More information

1

1 1 2 3 4 5 GNUDebugger 6 7 void main(int argc, char **argv){ vulncpy(argv[1]); return; } void vulncpy(char *a){ char buf[30]; strcpy(buf, a); return; } *argv[1] buf Shellcode *argv[1]... &buf &buf 8 strcpy

More information

C

C C 2017 3 14 1. 2. 3. 4. 2/95 C 1. 3/95 C I 1 // talkback.c: 2 #include 3 #include 4 #define DENSITY 62.4 5 int main(void) 6 { 7 float weight, volume; 8 int size; 9 unsigned long letters;

More information

Microsoft Word - 11.doc

Microsoft Word - 11.doc 除 錯 技 巧 您 將 於 本 章 學 到 以 下 各 項 : 如 何 在 Visual C++ 2010 的 除 錯 工 具 控 制 下 執 行 程 式? 如 何 逐 步 地 執 行 程 式 的 敘 述? 如 何 監 看 或 改 變 程 式 中 的 變 數 值? 如 何 監 看 程 式 中 計 算 式 的 值? 何 謂 Call Stack? 何 謂 診 斷 器 (assertion)? 如 何

More information

2/14 Buffer I12, /* x=2, buffer = I 1 2 */ Buffer I243, /* x=34, buffer = I 2 43 */ x=56, buffer = I243 Buffer I243I265 code_int(int x, char *buffer)

2/14 Buffer I12, /* x=2, buffer = I 1 2 */ Buffer I243, /* x=34, buffer = I 2 43 */ x=56, buffer = I243 Buffer I243I265 code_int(int x, char *buffer) 1/14 IBM Rational Test RealTime IBM, 2004 7 01 50% IBM Rational Test RealTime IBM Rational Test RealTime 1. 50% IBM Rational Test RealTime IBM Rational Test RealTime 2. IBM Rational Test RealTime Test

More information

第一章 概论

第一章  概论 1 2 3 4 5 6 7 8 Linux 7.1 7.1.1 1 1 2 3 2 3 1 2 3 3 1 2 3 7.1.2 1 2 1 2 3 4 5 7.1.3 1 1 2 3 2 7.1 3 7.1.4 1 1 PCB 2 3 2 PCB PCB PCB PCB PCB 4 1 2 PSW 3 CPU CPU 4 PCB PCB CPU PCB PCB PCB PCB PCB PCB PCB

More information

nooog

nooog C : : : , C C,,, C, C,, C ( ), ( ) C,,, ;,, ; C,,, ;, ;, ;, ;,,,, ;,,, ; : 1 9, 2 3, 4, 5, 6 10 11, 7 8, 12 13,,,,, 2008 1 1 (1 ) 1.1 (1 ) 1.1.1 ( ) 1.1.2 ( ) 1.1.3 ( ) 1.1.4 ( ) 1.1.5 ( ) 1.2 ( ) 1.2.1

More information

02

02 Thinking in C++: Volume One: Introduction to Standard C++, Second Edition & Volume Two: Practical Programming C++ C C++ C++ 3 3 C C class C++ C++ C++ C++ string vector 2.1 interpreter compiler 2.1.1 BASIC

More information

四川省普通高等学校

四川省普通高等学校 四 川 省 普 通 高 等 学 校 计 算 机 应 用 知 识 和 能 力 等 级 考 试 考 试 大 纲 (2013 年 试 行 版 ) 四 川 省 教 育 厅 计 算 机 等 级 考 试 中 心 2013 年 1 月 目 录 一 级 考 试 大 纲 1 二 级 考 试 大 纲 6 程 序 设 计 公 共 基 础 知 识 6 BASIC 语 言 程 序 设 计 (Visual Basic) 9

More information

untitled

untitled http://www.embedded-soc.com/ J-LINK J-Link Rev2.1 http://www.embedded-soc.com/ 2007-11-11 http://www.embedded-soc.com/ J-LINK J-Link ARM JTAG J-LINK J-LINKJLINK J-FLASH ARM F.A.Q jlink GDBserver J-Flash

More information

KT-SOPCx开发套件简明教程

KT-SOPCx开发套件简明教程 V2.03 2005-9-1 FPGA SOC FPGA/SOPC IT QuartusII NiosII IDE FPGA/SOPC FPGA/SOPC FPGA/SOPC CT-SOPCx FPGA/SOPC CPLD/FPGA www.fpga.com.cn CPLD/FPGA FPGA QuartusII NiosII CPU SOPC SOPC Builder NiosII IDE 1 www.21control.com

More information

C C C The Most Beautiful Language and Most Dangerous Language in the Programming World! C 2 C C C 4 C 40 30 10 Project 30 C Project 3 60 Project 40

C C C The Most Beautiful Language and Most Dangerous Language in the Programming World! C 2 C C C 4 C 40 30 10 Project 30 C Project 3 60 Project 40 C C trio@seu.edu.cn C C C C The Most Beautiful Language and Most Dangerous Language in the Programming World! C 2 C C C 4 C 40 30 10 Project 30 C Project 3 60 Project 40 Week3 C Week5 Week5 Memory & Pointer

More information

WinMDI 28

WinMDI 28 WinMDI WinMDI 2 Region Gate Marker Quadrant Excel FACScan IBM-PC MO WinMDI WinMDI IBM-PC Dr. Joseph Trotter the Scripps Research Institute WinMDI HP PC WinMDI WinMDI PC MS WORD, PowerPoint, Excel, LOTUS

More information

DPJJX1.DOC

DPJJX1.DOC 8051 111 2K 1 2 3 ' ' 1 CPU RAM ROM / A/D D/A PC CPU 40 68 10 20 8 51 PIII 8051 2 MCS51 8051 8031 89C51 8051 8031 89C51? MCS51 INTEL INTEL 8031 8051 8751 8032 8052 8752 8051 8051 8051 MCS51 8031 8031

More information

untitled

untitled 1 DBF (READDBF.C)... 1 2 (filetest.c)...2 3 (mousetes.c)...3 4 (painttes.c)...5 5 (dirtest.c)...9 6 (list.c)...9 1 dbf (readdbf.c) /* dbf */ #include int rf,k,reclen,addr,*p1; long brec,erec,i,j,recnum,*p2;

More information

IO

IO 1 C/C++ C FILE* fscanf fgets fread fprintf fputs fwrite C++ ifstream ofstream >>

More information

表3:

表3: 1. 面 向 对 象 程 序 设 计 课 程 教 学 大 纲 2. 面 向 对 象 程 序 设 计 实 验 教 学 大 纲 3. 离 散 数 学 课 程 教 学 大 纲 4. 数 据 结 构 课 程 教 学 大 纲 5. 数 据 结 构 实 验 教 学 大 纲 6. 计 算 机 组 成 原 理 课 程 教 学 大 纲 7. 操 作 系 统 课 程 教 学 大 纲 8. 操 作 系 统 实 验 教 学

More information

目錄    

目錄     1 錄 行...5...5 離...6 說...10 2-1...10 2-2...14 2-3...16 2-4 易 錄...18 2-5 金...23 2-6 行...26 2-7 行...26 2-8...30 2-9 易...32 2-10...33 2-11 E-mail...34 2-12 說...35 參...38 3-1...38 3-2...43 3-3...46 3-4...48

More information

新・解きながら学ぶJava

新・解きながら学ぶJava 481! 41, 74!= 40, 270 " 4 % 23, 25 %% 121 %c 425 %d 121 %o 121 %x 121 & 199 && 48 ' 81, 425 ( ) 14, 17 ( ) 128 ( ) 183 * 23 */ 3, 390 ++ 79 ++ 80 += 93 + 22 + 23 + 279 + 14 + 124 + 7, 148, 16 -- 79 --

More information

超级好的移值过程介绍: μC/GUI在MSGl9264液晶上的移植

超级好的移值过程介绍: μC/GUI在MSGl9264液晶上的移植 : C GUI MSGl9264 C GUI MSGl9264 µc GUI Micrium µc OS µc GUI * [1] µc GUI Windows µc GUI VC Windows µc GUI µc GUI µc GUI µc GUI MSGl9264 µc GUI 1 µc GUI MSP430F149 MSP430F149 16 (RISC 125ns ) ( ADC ) 2KB

More information

ICD ICD ICD ICD ICD

ICD ICD ICD ICD ICD MPLAB ICD2 MPLAB ICD2 PIC MPLAB-IDE V6.0 ICD2 usb PC RS232 MPLAB IDE PC PC 2.0 5.5V LED EEDATA MPLAB ICD2 Microchip MPLAB-IDE v6.0 Windows 95/98 Windows NT Windows 2000 www.elc-mcu.com 1 ICD2...4 1.1 ICD2...4

More information

uc/os 1

uc/os 1 uc/os 1 uc/os-ii Source Code ANSI C, uc/os-ii 8/16/32 bits microprocessor Preemptive real-time Task 64 Stack Size ROMable (C compiler, assembler and linker/locator) uc/os-ii Mailboxes, Queues, Semaphores,

More information

PCM-3386用户手册.doc

PCM-3386用户手册.doc PCM-3386 BBPC-4x86 10/100M PC/104 (Lanry technology Co. Ltd. Zhuhai) 38 1012836 (Address: Room 1012,Linhai Building,No. 38,west of Shihua Road,Zhuhai City,Guangdong Province,China) (post code)519015 (phone)0756-3366659

More information

Microsoft Word - 第3章.doc

Microsoft Word - 第3章.doc Java C++ Pascal C# C# if if if for while do while foreach while do while C# 3.1.1 ; 3-1 ischeck Test() While ischeck while static bool ischeck = true; public static void Test() while (ischeck) ; ischeck

More information

Oracle Oracle Solaris Studio IDE makefile C C++ Fortran makefile IDE Solaris Linux C/C++/Fortran Oracle IDE "P

Oracle Oracle Solaris Studio IDE makefile C C++ Fortran makefile IDE Solaris Linux C/C++/Fortran Oracle IDE P Oracle Solaris Studio 12.3 IDE 2011 12 E26461-01 2 7 8 9 9 Oracle 10 12 14 21 26 27 29 31 32 33 Oracle Solaris Studio IDE makefile C C++ Fortran makefile IDE Solaris Linux C/C++/Fortran Oracle IDE "Project

More information

全国计算机技术与软件专业技术资格(水平)考试

全国计算机技术与软件专业技术资格(水平)考试 全 国 计 算 机 技 术 与 软 件 专 业 技 术 资 格 ( 水 平 ) 考 试 2008 年 上 半 年 程 序 员 下 午 试 卷 ( 考 试 时 间 14:00~16:30 共 150 分 钟 ) 试 题 一 ( 共 15 分 ) 阅 读 以 下 说 明 和 流 程 图, 填 补 流 程 图 中 的 空 缺 (1)~(9), 将 解 答 填 入 答 题 纸 的 对 应 栏 内 [ 说 明

More information

Ch03_嵌入式作業系統建置_01

Ch03_嵌入式作業系統建置_01 Chapter 3 CPU Motorola DragonBall ( Palm PDA) MIPS ( CPU) Hitachi SH (Sega DreamCast CPU) ARM StrongARM CPU CPU RISC (reduced instruction set computer ) CISC (complex instruction set computer ) DSP(digital

More information

ebook111-4

ebook111-4 Flash 4 Flash 4 F l a s h 5 Flash 4 Flash Flash 4 Flash 4 Flash 4 4.1 Flash 4 Flash 4 Flash 4 Flash Flash 4 Flash 4 4.2 Flash 4 Flash 4 A Flash 4 S h i f t F i l e P r e f e r e n c e s > > Flash 4 Flash

More information

DR2010.doc

DR2010.doc DR/2010 HACH 11-8-96-2 HACH. DR/2010, / UL E79852 CSA C22.223 LR 58275 VDE GS 1015-92 FCC"A" 15 : AMADOR CORP, HACH. EN50 011/CISPR 11 "B" (EMI)/89/336/EEC/EMC: AMADOR CORP, HACH.. EN50 082-1( )/89/226/EEC

More information

P4i45GL_GV-R50-CN.p65

P4i45GL_GV-R50-CN.p65 1 Main Advanced Security Power Boot Exit System Date System Time Floppy Drives IDE Devices BIOS Version Processor Type Processor Speed Cache Size Microcode Update Total Memory DDR1 DDR2 Dec 18 2003 Thu

More information

一个开放源码的嵌入式仿真环境 ― SkyEye

一个开放源码的嵌入式仿真环境 ― SkyEye SkyEye SkyEye http://hpclab.cs.tsinghua.edu.cn/~skyeye/ I hear and I forget, I see and I remember, I do and I understand. SkyEye SkyEye SkyEye SkyEye SkyEye 1. SkyEye PC pervasive computing PC I O PDA

More information

MUGI Ver Copyright c 2001, 2002 Hitachi, Ltd. All rights reserved. 1

MUGI Ver Copyright c 2001, 2002 Hitachi, Ltd. All rights reserved. 1 MUGI Ver. 1.3 2002 5 8 1 1 3 2 3 2.1 Panama... 4 2.2... 5 3 5 3.1... 5 3.2... 5 3.3... 6 3.3.1... 6 3.3.2... 6 3.3.3... 7 3.3.4... 7 4 8 4.1... 8 4.2... 8 4.3... 9 4.3.1... 9 4.3.2... 9 4.4... 9 4.4.1

More information