diff --git a/blinker01/pi2/Makefile b/blinker01/pi2/Makefile deleted file mode 100644 index f21abf9..0000000 --- a/blinker01/pi2/Makefile +++ /dev/null @@ -1,71 +0,0 @@ - -ARMGNU ?= arm-none-eabi - -AOPS = --warn --fatal-warnings -COPS = -Wall -Werror -O2 -nostdlib -nostartfiles -ffreestanding - - - -gcc : blinker01.hex blinker01.bin - -all : gcc clang - -clean : - rm -f *.o - rm -f *.bin - rm -f *.hex - rm -f *.elf - rm -f *.list - rm -f *.img - rm -f *.bc - rm -f *.clang.opt.s - -vectors.o : vectors.s - $(ARMGNU)-as vectors.s -o vectors.o - -blinker01.o : blinker01.c - $(ARMGNU)-gcc $(COPS) -c blinker01.c -o blinker01.o - -blinker01.elf : memmap vectors.o blinker01.o - $(ARMGNU)-ld vectors.o blinker01.o -T memmap -o blinker01.elf - $(ARMGNU)-objdump -D blinker01.elf > blinker01.list - -blinker01.bin : blinker01.elf - $(ARMGNU)-objcopy blinker01.elf -O binary blinker01.bin - -blinker01.hex : blinker01.elf - $(ARMGNU)-objcopy blinker01.elf -O ihex blinker01.hex - - - - - - -LOPS = -Wall -m32 -emit-llvm -LLCOPS = -march=arm -mcpu=arm1176jzf-s -LLCOPS0 = -march=arm -LLCOPS1 = -march=arm -mcpu=arm1176jzf-s -COPS = -Wall -O2 -nostdlib -nostartfiles -ffreestanding -#OOPS = -std-compile-opts -OOPS = -std-link-opts - -clang : blinker01.clang.hex blinker01.clang.bin - - -blinker01.clang.bc : blinker01.c - clang $(LOPS) -c blinker01.c -o blinker01.clang.bc - -blinker01.clang.opt.elf : memmap vectors.o blinker01.clang.bc - opt $(OOPS) blinker01.clang.bc -o blinker01.clang.opt.bc - llc $(LLCOPS) blinker01.clang.opt.bc -o blinker01.clang.opt.s - $(ARMGNU)-as blinker01.clang.opt.s -o blinker01.clang.opt.o - $(ARMGNU)-ld -o blinker01.clang.opt.elf -T memmap vectors.o blinker01.clang.opt.o - $(ARMGNU)-objdump -D blinker01.clang.opt.elf > blinker01.clang.opt.list - -blinker01.clang.hex : blinker01.clang.opt.elf - $(ARMGNU)-objcopy blinker01.clang.opt.elf blinker01.clang.hex -O ihex - -blinker01.clang.bin : blinker01.clang.opt.elf - $(ARMGNU)-objcopy blinker01.clang.opt.elf blinker01.clang.bin -O binary - - diff --git a/blinker01/pi2/README b/blinker01/pi2/README deleted file mode 100644 index de90a37..0000000 --- a/blinker01/pi2/README +++ /dev/null @@ -1,16 +0,0 @@ - -See the top level README for information on where to find the -schematic and programmers reference manual for the ARM processor -on the raspberry pi. Also find information on how to load and run -these programs. - -Same as blinker01 in the directory above, except the raspberry pi 2 -has two leds one on gpio47 the other gpio35 - -Also note to make more room for ram the raspberry pi 2 uses a base -address for peripherals of 0x3F000000 where the raspberry pi used -0x20000000. - -also note that for the raspberry pi 2 the arm file copied from the -sd card to ram is kernel7.img the older raspberry pis still use -kernel.img. diff --git a/blinker01/pi2/asm/Makefile b/blinker01/pi2/asm/Makefile deleted file mode 100644 index daa7128..0000000 --- a/blinker01/pi2/asm/Makefile +++ /dev/null @@ -1,70 +0,0 @@ - -ARMGNU ?= arm-none-eabi - -AOPS = --warn --fatal-warnings -COPS = -Wall -Werror -O2 -nostdlib -nostartfiles -ffreestanding - - - -gcc : blinker01.hex blinker01.bin blinker.list - -all : gcc clang - -clean : - rm -f *.o - rm -f *.bin - rm -f *.hex - rm -f *.elf - rm -f *.list - rm -f *.img - rm -f *.bc - rm -f *.clang.opt.s - -vectors.o : vectors.s - $(ARMGNU)-as vectors.s -o vectors.o - -blinker01.o : blinker01.c - $(ARMGNU)-gcc $(COPS) -c blinker01.c -o blinker01.o - -blinker01.elf : memmap vectors.o blinker01.o - $(ARMGNU)-ld vectors.o blinker01.o -T memmap -o blinker01.elf - $(ARMGNU)-objdump -D blinker01.elf > blinker01.list - -blinker01.bin : blinker01.elf - $(ARMGNU)-objcopy blinker01.elf -O binary blinker01.bin - -blinker01.hex : blinker01.elf - $(ARMGNU)-objcopy blinker01.elf -O ihex blinker01.hex - -blinker.list : blinker.s - arm-none-eabi-as blinker.s -o blinker.o - arm-none-eabi-objdump -D blinker.o > blinker.list - - -LOPS = -Wall -m32 -emit-llvm -LLCOPS = -march=arm -mcpu=arm1176jzf-s -LLCOPS0 = -march=arm -LLCOPS1 = -march=arm -mcpu=arm1176jzf-s -COPS = -Wall -O2 -nostdlib -nostartfiles -ffreestanding -OOPS = -std-compile-opts - -clang : blinker01.clang.hex blinker01.clang.bin - - -blinker01.clang.bc : blinker01.c - clang $(LOPS) -c blinker01.c -o blinker01.clang.bc - -blinker01.clang.opt.elf : memmap vectors.o blinker01.clang.bc - opt $(OOPS) blinker01.clang.bc -o blinker01.clang.opt.bc - llc $(LLCOPS) blinker01.clang.opt.bc -o blinker01.clang.opt.s - $(ARMGNU)-as blinker01.clang.opt.s -o blinker01.clang.opt.o - $(ARMGNU)-ld -o blinker01.clang.opt.elf -T memmap vectors.o blinker01.clang.opt.o - $(ARMGNU)-objdump -D blinker01.clang.opt.elf > blinker01.clang.opt.list - -blinker01.clang.hex : blinker01.clang.opt.elf - $(ARMGNU)-objcopy blinker01.clang.opt.elf blinker01.clang.hex -O ihex - -blinker01.clang.bin : blinker01.clang.opt.elf - $(ARMGNU)-objcopy blinker01.clang.opt.elf blinker01.clang.bin -O binary - - diff --git a/blinker01/pi2/asm/README b/blinker01/pi2/asm/README deleted file mode 100644 index f26553f..0000000 --- a/blinker01/pi2/asm/README +++ /dev/null @@ -1,17 +0,0 @@ - -See the top level README for information on where to find the -schematic and programmers reference manual for the ARM processor -on the raspberry pi. Also find information on how to load and run -these programs. - -specifically for a forum question, self modifying code if you will, -writes instructions to ram then branches to that code. in this case -essentially the same blinker01 example just some asm that is loaded -by the running program then branched to. - -blinker.s is the ASM program that does the blinking and blinker01.c -just writes those instrucions to ram and executes them. blinker.list -once assembled and dumped shows the list of instructions. naturally -you have to start at an address that is aligned on a 32 bit boundary, -any address that has ram behind it not being used by the program -loading nor the gpu, should work. diff --git a/blinker01/pi2/asm/blinker.s b/blinker01/pi2/asm/blinker.s deleted file mode 100644 index d12ac51..0000000 --- a/blinker01/pi2/asm/blinker.s +++ /dev/null @@ -1,49 +0,0 @@ - -;@ ------------------------------------------------------------------ -;@ ------------------------------------------------------------------ - -.globl _start -_start: - mov r0,#0x3F000000 - orr r0,r0,#0x00200000 - ldr r1,[r0,#0x10] - bic r1,r1,#0x00E00000 - orr r1,r1,#0x00200000 - str r1,[r0,#0x10] - ldr r1,[r0,#0x0C] - bic r1,r1,#0x00038000 - orr r1,r1,#0x00008000 - str r1,[r0,#0x0C] - mov r2,#0x00008000 - mov r3,#0x00000008 - -mainloop: - str r2,[r0,#0x20] - str r3,[r0,#0x2C] - mov r4,#0x100000 -one: - subs r4,r4,#1 - bne one - str r2,[r0,#0x2C] - str r3,[r0,#0x20] - mov r4,#0x100000 -two: - subs r4,r4,#1 - bne two - b mainloop - -;@------------------------------------------------------------------------- -;@------------------------------------------------------------------------- - - -;@------------------------------------------------------------------------- -;@ -;@ Copyright (c) 2012 David Welch dwelch@dwelch.com -;@ -;@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -;@ -;@ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -;@ -;@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -;@ -;@------------------------------------------------------------------------- diff --git a/blinker01/pi2/asm/blinker01.c b/blinker01/pi2/asm/blinker01.c deleted file mode 100644 index 5f248be..0000000 --- a/blinker01/pi2/asm/blinker01.c +++ /dev/null @@ -1,63 +0,0 @@ - -//------------------------------------------------------------------------- -//------------------------------------------------------------------------- - -extern void PUT32 ( unsigned int, unsigned int ); -extern unsigned int GET32 ( unsigned int ); -extern void dummy ( unsigned int ); -extern void HOP ( unsigned int ); - -void put32(unsigned long int addr, unsigned long int val) { - volatile unsigned long int *a; - a = addr; - *a = val; -} -//------------------------------------------------------------------------- -int notmain ( void ) -{ - unsigned int ra; - - ra=0x10000; - - PUT32(ra,0xe3a0043f); ra+=4; - PUT32(ra,0xe3800602); ra+=4; - PUT32(ra,0xe5901010); ra+=4; - PUT32(ra,0xe3c1160e); ra+=4; - PUT32(ra,0xe3811602); ra+=4; - PUT32(ra,0xe5801010); ra+=4; - PUT32(ra,0xe590100c); ra+=4; - PUT32(ra,0xe3c1190e); ra+=4; - PUT32(ra,0xe3811902); ra+=4; - PUT32(ra,0xe580100c); ra+=4; - PUT32(ra,0xe3a02902); ra+=4; - put32(ra,0xe3a03008); ra+=4; - PUT32(ra,0xe5802020); ra+=4; - PUT32(ra,0xe580302c); ra+=4; - PUT32(ra,0xe3a04601); ra+=4; - PUT32(ra,0xe2544001); ra+=4; - PUT32(ra,0x1afffffd); ra+=4; - PUT32(ra,0xe580202c); ra+=4; - PUT32(ra,0xe5803020); ra+=4; - PUT32(ra,0xe3a04601); ra+=4; - PUT32(ra,0xe2544001); ra+=4; - PUT32(ra,0x1afffffd); ra+=4; - PUT32(ra,0xeafffff4); ra+=4; - - HOP(0x10000); - return(0); -} -//------------------------------------------------------------------------- -//------------------------------------------------------------------------- - - -//------------------------------------------------------------------------- -// -// Copyright (c) 2012 David Welch dwelch@dwelch.com -// -// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -//------------------------------------------------------------------------- diff --git a/blinker01/pi2/asm/memmap b/blinker01/pi2/asm/memmap deleted file mode 100644 index afebc70..0000000 --- a/blinker01/pi2/asm/memmap +++ /dev/null @@ -1,11 +0,0 @@ - -MEMORY -{ - ram : ORIGIN = 0x8000, LENGTH = 0x10000 -} - -SECTIONS -{ - .text : { *(.text*) } > ram - .bss : { *(.bss*) } > ram -} diff --git a/blinker01/pi2/asm/vectors.s b/blinker01/pi2/asm/vectors.s deleted file mode 100644 index d5be46d..0000000 --- a/blinker01/pi2/asm/vectors.s +++ /dev/null @@ -1,43 +0,0 @@ - -;@ ------------------------------------------------------------------ -;@ ------------------------------------------------------------------ - -.globl _start -_start: - mov sp,#0x8000 - bl notmain -hang: b hang - -.globl PUT32 -PUT32: - str r1,[r0] - bx lr - -.globl GET32 -GET32: - ldr r0,[r0] - bx lr - -.globl dummy -dummy: - bx lr - -.globl HOP -HOP: - bx r0 - -;@------------------------------------------------------------------------- -;@------------------------------------------------------------------------- - - -;@------------------------------------------------------------------------- -;@ -;@ Copyright (c) 2012 David Welch dwelch@dwelch.com -;@ -;@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -;@ -;@ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -;@ -;@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -;@ -;@------------------------------------------------------------------------- diff --git a/blinker01/pi2/blinker01.bin b/blinker01/pi2/blinker01.bin deleted file mode 100755 index 448655c..0000000 Binary files a/blinker01/pi2/blinker01.bin and /dev/null differ diff --git a/blinker01/pi2/blinker01.c b/blinker01/pi2/blinker01.c deleted file mode 100644 index a37c6f4..0000000 --- a/blinker01/pi2/blinker01.c +++ /dev/null @@ -1,55 +0,0 @@ - -//------------------------------------------------------------------------- -//------------------------------------------------------------------------- - -extern void PUT32 ( unsigned int, unsigned int ); -extern unsigned int GET32 ( unsigned int ); -extern void dummy ( unsigned int ); - -#define GPFSEL3 0x3F20000C -#define GPFSEL4 0x3F200010 -#define GPSET1 0x3F200020 -#define GPCLR1 0x3F20002C - -//------------------------------------------------------------------------- -int notmain ( void ) -{ - unsigned int ra; - - ra=GET32(GPFSEL4); - ra&=~(7<<21); - ra|=1<<21; - PUT32(GPFSEL4,ra); - - ra=GET32(GPFSEL3); - ra&=~(7<<15); - ra|=1<<15; - PUT32(GPFSEL3,ra); - - while(1) - { - PUT32(GPSET1,1<<(47-32)); - PUT32(GPCLR1,1<<(35-32)); - for(ra=0;ra<0x100000;ra++) dummy(ra); - PUT32(GPCLR1,1<<(47-32)); - PUT32(GPSET1,1<<(35-32)); - for(ra=0;ra<0x100000;ra++) dummy(ra); - } - - return(0); -} -//------------------------------------------------------------------------- -//------------------------------------------------------------------------- - - -//------------------------------------------------------------------------- -// -// Copyright (c) 2015 David Welch dwelch@dwelch.com -// -// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -//------------------------------------------------------------------------- diff --git a/blinker01/pi2/memmap b/blinker01/pi2/memmap deleted file mode 100644 index afebc70..0000000 --- a/blinker01/pi2/memmap +++ /dev/null @@ -1,11 +0,0 @@ - -MEMORY -{ - ram : ORIGIN = 0x8000, LENGTH = 0x10000 -} - -SECTIONS -{ - .text : { *(.text*) } > ram - .bss : { *(.bss*) } > ram -} diff --git a/blinker01/pi2/vectors.s b/blinker01/pi2/vectors.s deleted file mode 100644 index 9cdad8b..0000000 --- a/blinker01/pi2/vectors.s +++ /dev/null @@ -1,39 +0,0 @@ - -;@ ------------------------------------------------------------------ -;@ ------------------------------------------------------------------ - -.globl _start -_start: - mov sp,#0x8000 - bl notmain -hang: b hang - -.globl PUT32 -PUT32: - str r1,[r0] - bx lr - -.globl GET32 -GET32: - ldr r0,[r0] - bx lr - -.globl dummy -dummy: - bx lr - -;@------------------------------------------------------------------------- -;@------------------------------------------------------------------------- - - -;@------------------------------------------------------------------------- -;@ -;@ Copyright (c) 2012 David Welch dwelch@dwelch.com -;@ -;@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -;@ -;@ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -;@ -;@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -;@ -;@------------------------------------------------------------------------- diff --git a/blinker01/plus/Makefile b/blinker01/plus/Makefile deleted file mode 100644 index f21abf9..0000000 --- a/blinker01/plus/Makefile +++ /dev/null @@ -1,71 +0,0 @@ - -ARMGNU ?= arm-none-eabi - -AOPS = --warn --fatal-warnings -COPS = -Wall -Werror -O2 -nostdlib -nostartfiles -ffreestanding - - - -gcc : blinker01.hex blinker01.bin - -all : gcc clang - -clean : - rm -f *.o - rm -f *.bin - rm -f *.hex - rm -f *.elf - rm -f *.list - rm -f *.img - rm -f *.bc - rm -f *.clang.opt.s - -vectors.o : vectors.s - $(ARMGNU)-as vectors.s -o vectors.o - -blinker01.o : blinker01.c - $(ARMGNU)-gcc $(COPS) -c blinker01.c -o blinker01.o - -blinker01.elf : memmap vectors.o blinker01.o - $(ARMGNU)-ld vectors.o blinker01.o -T memmap -o blinker01.elf - $(ARMGNU)-objdump -D blinker01.elf > blinker01.list - -blinker01.bin : blinker01.elf - $(ARMGNU)-objcopy blinker01.elf -O binary blinker01.bin - -blinker01.hex : blinker01.elf - $(ARMGNU)-objcopy blinker01.elf -O ihex blinker01.hex - - - - - - -LOPS = -Wall -m32 -emit-llvm -LLCOPS = -march=arm -mcpu=arm1176jzf-s -LLCOPS0 = -march=arm -LLCOPS1 = -march=arm -mcpu=arm1176jzf-s -COPS = -Wall -O2 -nostdlib -nostartfiles -ffreestanding -#OOPS = -std-compile-opts -OOPS = -std-link-opts - -clang : blinker01.clang.hex blinker01.clang.bin - - -blinker01.clang.bc : blinker01.c - clang $(LOPS) -c blinker01.c -o blinker01.clang.bc - -blinker01.clang.opt.elf : memmap vectors.o blinker01.clang.bc - opt $(OOPS) blinker01.clang.bc -o blinker01.clang.opt.bc - llc $(LLCOPS) blinker01.clang.opt.bc -o blinker01.clang.opt.s - $(ARMGNU)-as blinker01.clang.opt.s -o blinker01.clang.opt.o - $(ARMGNU)-ld -o blinker01.clang.opt.elf -T memmap vectors.o blinker01.clang.opt.o - $(ARMGNU)-objdump -D blinker01.clang.opt.elf > blinker01.clang.opt.list - -blinker01.clang.hex : blinker01.clang.opt.elf - $(ARMGNU)-objcopy blinker01.clang.opt.elf blinker01.clang.hex -O ihex - -blinker01.clang.bin : blinker01.clang.opt.elf - $(ARMGNU)-objcopy blinker01.clang.opt.elf blinker01.clang.bin -O binary - - diff --git a/blinker01/plus/README b/blinker01/plus/README deleted file mode 100644 index 5ae9c98..0000000 --- a/blinker01/plus/README +++ /dev/null @@ -1,12 +0,0 @@ - -See the top level README for information on where to find the -schematic and programmers reference manual for the ARM processor -on the raspberry pi. Also find information on how to load and run -these programs. - -Same as blinker01 in the directory above, except the raspberry pi 1 -A+ and B+ have two leds one on gpio47 the other gpio35. - -I tested this on an A+. I probably have a B+ around somewhere, but -not sure where. The A+ does appear to have two leds and they are both -blinking. diff --git a/blinker01/plus/blinker01.c b/blinker01/plus/blinker01.c deleted file mode 100644 index e30a815..0000000 --- a/blinker01/plus/blinker01.c +++ /dev/null @@ -1,55 +0,0 @@ - -//------------------------------------------------------------------------- -//------------------------------------------------------------------------- - -extern void PUT32 ( unsigned int, unsigned int ); -extern unsigned int GET32 ( unsigned int ); -extern void dummy ( unsigned int ); - -#define GPFSEL3 0x2020000C -#define GPFSEL4 0x20200010 -#define GPSET1 0x20200020 -#define GPCLR1 0x2020002C - -//------------------------------------------------------------------------- -int notmain ( void ) -{ - unsigned int ra; - - ra=GET32(GPFSEL4); - ra&=~(7<<21); - ra|=1<<21; - PUT32(GPFSEL4,ra); - - ra=GET32(GPFSEL3); - ra&=~(7<<15); - ra|=1<<15; - PUT32(GPFSEL3,ra); - - while(1) - { - PUT32(GPSET1,1<<(47-32)); - PUT32(GPCLR1,1<<(35-32)); - for(ra=0;ra<0x100000;ra++) dummy(ra); - PUT32(GPCLR1,1<<(47-32)); - PUT32(GPSET1,1<<(35-32)); - for(ra=0;ra<0x100000;ra++) dummy(ra); - } - - return(0); -} -//------------------------------------------------------------------------- -//------------------------------------------------------------------------- - - -//------------------------------------------------------------------------- -// -// Copyright (c) 2015 David Welch dwelch@dwelch.com -// -// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -//------------------------------------------------------------------------- diff --git a/blinker01/plus/memmap b/blinker01/plus/memmap deleted file mode 100644 index afebc70..0000000 --- a/blinker01/plus/memmap +++ /dev/null @@ -1,11 +0,0 @@ - -MEMORY -{ - ram : ORIGIN = 0x8000, LENGTH = 0x10000 -} - -SECTIONS -{ - .text : { *(.text*) } > ram - .bss : { *(.bss*) } > ram -} diff --git a/blinker01/plus/vectors.s b/blinker01/plus/vectors.s deleted file mode 100644 index 9cdad8b..0000000 --- a/blinker01/plus/vectors.s +++ /dev/null @@ -1,39 +0,0 @@ - -;@ ------------------------------------------------------------------ -;@ ------------------------------------------------------------------ - -.globl _start -_start: - mov sp,#0x8000 - bl notmain -hang: b hang - -.globl PUT32 -PUT32: - str r1,[r0] - bx lr - -.globl GET32 -GET32: - ldr r0,[r0] - bx lr - -.globl dummy -dummy: - bx lr - -;@------------------------------------------------------------------------- -;@------------------------------------------------------------------------- - - -;@------------------------------------------------------------------------- -;@ -;@ Copyright (c) 2012 David Welch dwelch@dwelch.com -;@ -;@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -;@ -;@ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -;@ -;@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -;@ -;@------------------------------------------------------------------------- diff --git a/blinker02/pi2/Makefile b/blinker02/pi2/Makefile deleted file mode 100644 index b0a5440..0000000 --- a/blinker02/pi2/Makefile +++ /dev/null @@ -1,67 +0,0 @@ - -ARMGNU ?= arm-none-eabi - -COPS = -Wall -O2 -nostdlib -nostartfiles -ffreestanding - -gcc : blinker02.hex blinker02.bin - -all : gcc clang - -clean : - rm -f *.o - rm -f *.bin - rm -f *.hex - rm -f *.elf - rm -f *.list - rm -f *.img - rm -f *.bc - rm -f *.clang.opt.s - -vectors.o : vectors.s - $(ARMGNU)-as vectors.s -o vectors.o - -blinker02.o : blinker02.c - $(ARMGNU)-gcc $(COPS) -c blinker02.c -o blinker02.o - -blinker02.elf : memmap vectors.o blinker02.o - $(ARMGNU)-ld vectors.o blinker02.o -T memmap -o blinker02.elf - $(ARMGNU)-objdump -D blinker02.elf > blinker02.list - -blinker02.bin : blinker02.elf - $(ARMGNU)-objcopy blinker02.elf -O binary blinker02.bin - -blinker02.hex : blinker02.elf - $(ARMGNU)-objcopy blinker02.elf -O ihex blinker02.hex - - - - - - -LOPS = -Wall -m32 -emit-llvm -LLCOPS = -march=arm -mcpu=arm1176jzf-s -LLCOPS0 = -march=arm -LLCOPS1 = -march=arm -mcpu=arm1176jzf-s -COPS = -Wall -O2 -nostdlib -nostartfiles -ffreestanding -#OOPS = -std-compile-opts -OOPS = -std-link-opts - -clang : blinker02.clang.hex blinker02.clang.bin - - -blinker02.clang.bc : blinker02.c - clang $(LOPS) -c blinker02.c -o blinker02.clang.bc - -blinker02.clang.opt.elf : memmap vectors.o blinker02.clang.bc - opt $(OOPS) blinker02.clang.bc -o blinker02.clang.opt.bc - llc $(LLCOPS) blinker02.clang.opt.bc -o blinker02.clang.opt.s - $(ARMGNU)-as blinker02.clang.opt.s -o blinker02.clang.opt.o - $(ARMGNU)-ld -o blinker02.clang.opt.elf -T memmap vectors.o blinker02.clang.opt.o - $(ARMGNU)-objdump -D blinker02.clang.opt.elf > blinker02.clang.opt.list - -blinker02.clang.hex : blinker02.clang.opt.elf - $(ARMGNU)-objcopy blinker02.clang.opt.elf blinker02.clang.hex -O ihex - -blinker02.clang.bin : blinker02.clang.opt.elf - $(ARMGNU)-objcopy blinker02.clang.opt.elf blinker02.clang.bin -O binary - diff --git a/blinker02/pi2/README b/blinker02/pi2/README deleted file mode 100644 index e6fc583..0000000 --- a/blinker02/pi2/README +++ /dev/null @@ -1,9 +0,0 @@ - -See the top level README for information on where to find the -schematic and programmers reference manual for the ARM processor -on the raspberry pi. Also find information on how to load and run -these programs. - -Same as blinker02 in the plus directory except the raspberry pi 2 -uses a different base address (0x3F000000) than the raspberry pi 1 -(0x20000000) likely to make room for more ram but who knows. diff --git a/blinker02/pi2/blinker02.c b/blinker02/pi2/blinker02.c deleted file mode 100644 index a15a706..0000000 --- a/blinker02/pi2/blinker02.c +++ /dev/null @@ -1,68 +0,0 @@ - -//------------------------------------------------------------------------- -//------------------------------------------------------------------------- - -extern void PUT32 ( unsigned int, unsigned int ); -extern unsigned int GET32 ( unsigned int ); -extern void dummy ( unsigned int ); - -#define SYSTIMERCLO 0x3F003004 -#define GPFSEL3 0x3F20000C -#define GPFSEL4 0x3F200010 -#define GPSET1 0x3F200020 -#define GPCLR1 0x3F20002C - -//0x01000000 17 seconds -//0x00400000 4 seconds -#define TIMER_BIT 0x00400000 - -//------------------------------------------------------------------------- -int notmain ( void ) -{ - unsigned int ra; - - ra=GET32(GPFSEL4); - ra&=~(7<<21); - ra|=1<<21; - PUT32(GPFSEL4,ra); - - ra=GET32(GPFSEL3); - ra&=~(7<<15); - ra|=1<<15; - PUT32(GPFSEL3,ra); - - - while(1) - { - PUT32(GPSET1,1<<(47-32)); - PUT32(GPCLR1,1<<(35-32)); - while(1) - { - ra=GET32(SYSTIMERCLO); - if((ra&=TIMER_BIT)==TIMER_BIT) break; - } - PUT32(GPCLR1,1<<(47-32)); - PUT32(GPSET1,1<<(35-32)); - while(1) - { - ra=GET32(SYSTIMERCLO); - if((ra&=TIMER_BIT)==0) break; - } - } - return(0); -} -//------------------------------------------------------------------------- -//------------------------------------------------------------------------- - - -//------------------------------------------------------------------------- -// -// Copyright (c) 2012 David Welch dwelch@dwelch.com -// -// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -//------------------------------------------------------------------------- diff --git a/blinker02/pi2/memmap b/blinker02/pi2/memmap deleted file mode 100644 index 2dab497..0000000 --- a/blinker02/pi2/memmap +++ /dev/null @@ -1,11 +0,0 @@ - -MEMORY -{ - ram : ORIGIN = 0x8000, LENGTH = 0x1000 -} - -SECTIONS -{ - .text : { *(.text*) } > ram - .bss : { *(.bss*) } > ram -} diff --git a/blinker02/pi2/vectors.s b/blinker02/pi2/vectors.s deleted file mode 100644 index 4f279b1..0000000 --- a/blinker02/pi2/vectors.s +++ /dev/null @@ -1,39 +0,0 @@ - -;@ ------------------------------------------------------------------ -;@ ------------------------------------------------------------------ - -.globl _start -_start: - mov sp,#0x8000 - bl notmain -hang: b hang - -.globl PUT32 -PUT32: - str r1,[r0] - bx lr - -.globl GET32 -GET32: - ldr r0,[r0] - bx lr - -.globl dummy -dummy: - bx lr - -;@ ------------------------------------------------------------------ -;@ ------------------------------------------------------------------ - - -;@------------------------------------------------------------------------- -;@ -;@ Copyright (c) 2012 David Welch dwelch@dwelch.com -;@ -;@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -;@ -;@ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -;@ -;@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -;@ -;@------------------------------------------------------------------------- diff --git a/blinker02/plus/Makefile b/blinker02/plus/Makefile deleted file mode 100644 index b0a5440..0000000 --- a/blinker02/plus/Makefile +++ /dev/null @@ -1,67 +0,0 @@ - -ARMGNU ?= arm-none-eabi - -COPS = -Wall -O2 -nostdlib -nostartfiles -ffreestanding - -gcc : blinker02.hex blinker02.bin - -all : gcc clang - -clean : - rm -f *.o - rm -f *.bin - rm -f *.hex - rm -f *.elf - rm -f *.list - rm -f *.img - rm -f *.bc - rm -f *.clang.opt.s - -vectors.o : vectors.s - $(ARMGNU)-as vectors.s -o vectors.o - -blinker02.o : blinker02.c - $(ARMGNU)-gcc $(COPS) -c blinker02.c -o blinker02.o - -blinker02.elf : memmap vectors.o blinker02.o - $(ARMGNU)-ld vectors.o blinker02.o -T memmap -o blinker02.elf - $(ARMGNU)-objdump -D blinker02.elf > blinker02.list - -blinker02.bin : blinker02.elf - $(ARMGNU)-objcopy blinker02.elf -O binary blinker02.bin - -blinker02.hex : blinker02.elf - $(ARMGNU)-objcopy blinker02.elf -O ihex blinker02.hex - - - - - - -LOPS = -Wall -m32 -emit-llvm -LLCOPS = -march=arm -mcpu=arm1176jzf-s -LLCOPS0 = -march=arm -LLCOPS1 = -march=arm -mcpu=arm1176jzf-s -COPS = -Wall -O2 -nostdlib -nostartfiles -ffreestanding -#OOPS = -std-compile-opts -OOPS = -std-link-opts - -clang : blinker02.clang.hex blinker02.clang.bin - - -blinker02.clang.bc : blinker02.c - clang $(LOPS) -c blinker02.c -o blinker02.clang.bc - -blinker02.clang.opt.elf : memmap vectors.o blinker02.clang.bc - opt $(OOPS) blinker02.clang.bc -o blinker02.clang.opt.bc - llc $(LLCOPS) blinker02.clang.opt.bc -o blinker02.clang.opt.s - $(ARMGNU)-as blinker02.clang.opt.s -o blinker02.clang.opt.o - $(ARMGNU)-ld -o blinker02.clang.opt.elf -T memmap vectors.o blinker02.clang.opt.o - $(ARMGNU)-objdump -D blinker02.clang.opt.elf > blinker02.clang.opt.list - -blinker02.clang.hex : blinker02.clang.opt.elf - $(ARMGNU)-objcopy blinker02.clang.opt.elf blinker02.clang.hex -O ihex - -blinker02.clang.bin : blinker02.clang.opt.elf - $(ARMGNU)-objcopy blinker02.clang.opt.elf blinker02.clang.bin -O binary - diff --git a/blinker02/plus/README b/blinker02/plus/README deleted file mode 100644 index 4df636f..0000000 --- a/blinker02/plus/README +++ /dev/null @@ -1,11 +0,0 @@ - -See the top level README for information on where to find the -schematic and programmers reference manual for the ARM processor -on the raspberry pi. Also find information on how to load and run -these programs. - -Same as blinker02 in the directory above, except the raspberry pi 1 -A+ and B+ have two leds one on gpio47 the other gpio35. - -I tested this on an A+. - diff --git a/blinker02/plus/blinker02.c b/blinker02/plus/blinker02.c deleted file mode 100644 index 11d4e64..0000000 --- a/blinker02/plus/blinker02.c +++ /dev/null @@ -1,68 +0,0 @@ - -//------------------------------------------------------------------------- -//------------------------------------------------------------------------- - -extern void PUT32 ( unsigned int, unsigned int ); -extern unsigned int GET32 ( unsigned int ); -extern void dummy ( unsigned int ); - -#define SYSTIMERCLO 0x20003004 -#define GPFSEL3 0x2020000C -#define GPFSEL4 0x20200010 -#define GPSET1 0x20200020 -#define GPCLR1 0x2020002C - -//0x01000000 17 seconds -//0x00400000 4 seconds -#define TIMER_BIT 0x00400000 - -//------------------------------------------------------------------------- -int notmain ( void ) -{ - unsigned int ra; - - ra=GET32(GPFSEL4); - ra&=~(7<<21); - ra|=1<<21; - PUT32(GPFSEL4,ra); - - ra=GET32(GPFSEL3); - ra&=~(7<<15); - ra|=1<<15; - PUT32(GPFSEL3,ra); - - - while(1) - { - PUT32(GPSET1,1<<(47-32)); - PUT32(GPCLR1,1<<(35-32)); - while(1) - { - ra=GET32(SYSTIMERCLO); - if((ra&=TIMER_BIT)==TIMER_BIT) break; - } - PUT32(GPCLR1,1<<(47-32)); - PUT32(GPSET1,1<<(35-32)); - while(1) - { - ra=GET32(SYSTIMERCLO); - if((ra&=TIMER_BIT)==0) break; - } - } - return(0); -} -//------------------------------------------------------------------------- -//------------------------------------------------------------------------- - - -//------------------------------------------------------------------------- -// -// Copyright (c) 2012 David Welch dwelch@dwelch.com -// -// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -//------------------------------------------------------------------------- diff --git a/blinker02/plus/memmap b/blinker02/plus/memmap deleted file mode 100644 index 2dab497..0000000 --- a/blinker02/plus/memmap +++ /dev/null @@ -1,11 +0,0 @@ - -MEMORY -{ - ram : ORIGIN = 0x8000, LENGTH = 0x1000 -} - -SECTIONS -{ - .text : { *(.text*) } > ram - .bss : { *(.bss*) } > ram -} diff --git a/blinker02/plus/vectors.s b/blinker02/plus/vectors.s deleted file mode 100644 index 4f279b1..0000000 --- a/blinker02/plus/vectors.s +++ /dev/null @@ -1,39 +0,0 @@ - -;@ ------------------------------------------------------------------ -;@ ------------------------------------------------------------------ - -.globl _start -_start: - mov sp,#0x8000 - bl notmain -hang: b hang - -.globl PUT32 -PUT32: - str r1,[r0] - bx lr - -.globl GET32 -GET32: - ldr r0,[r0] - bx lr - -.globl dummy -dummy: - bx lr - -;@ ------------------------------------------------------------------ -;@ ------------------------------------------------------------------ - - -;@------------------------------------------------------------------------- -;@ -;@ Copyright (c) 2012 David Welch dwelch@dwelch.com -;@ -;@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -;@ -;@ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -;@ -;@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -;@ -;@------------------------------------------------------------------------- diff --git a/blinker05/pi2/Makefile b/blinker05/pi2/Makefile deleted file mode 100644 index 7bbba4c..0000000 --- a/blinker05/pi2/Makefile +++ /dev/null @@ -1,70 +0,0 @@ - -ARMGNU ?= arm-none-eabi - -AOPS = --warn --fatal-warnings -COPS = -Wall -Werror -O2 -nostdlib -nostartfiles -ffreestanding - - - -gcc : blinker05.hex blinker05.bin - -all : gcc clang - -clean : - rm -f *.o - rm -f *.bin - rm -f *.hex - rm -f *.elf - rm -f *.list - rm -f *.img - rm -f *.bc - rm -f *.clang.opt.s - -vectors.o : vectors.s - $(ARMGNU)-as vectors.s -o vectors.o - -blinker05.o : blinker05.c - $(ARMGNU)-gcc $(COPS) -c blinker05.c -o blinker05.o - -blinker05.elf : memmap vectors.o blinker05.o - $(ARMGNU)-ld vectors.o blinker05.o -T memmap -o blinker05.elf - $(ARMGNU)-objdump -D blinker05.elf > blinker05.list - -blinker05.bin : blinker05.elf - $(ARMGNU)-objcopy blinker05.elf -O binary blinker05.bin - -blinker05.hex : blinker05.elf - $(ARMGNU)-objcopy blinker05.elf -O ihex blinker05.hex - - - - - - -LOPS = -Wall -m32 -emit-llvm -LLCOPS = -march=arm -mcpu=arm1176jzf-s -LLCOPS0 = -march=arm -LLCOPS1 = -march=arm -mcpu=arm1176jzf-s -COPS = -Wall -O2 -nostdlib -nostartfiles -ffreestanding -OOPS = -std-compile-opts - -clang : blinker05.clang.hex blinker05.clang.bin - - -blinker05.clang.bc : blinker05.c - clang $(LOPS) -c blinker05.c -o blinker05.clang.bc - -blinker05.clang.opt.elf : memmap vectors.o blinker05.clang.bc - opt $(OOPS) blinker05.clang.bc -o blinker05.clang.opt.bc - llc $(LLCOPS) blinker05.clang.opt.bc -o blinker05.clang.opt.s - $(ARMGNU)-as blinker05.clang.opt.s -o blinker05.clang.opt.o - $(ARMGNU)-ld -o blinker05.clang.opt.elf -T memmap vectors.o blinker05.clang.opt.o - $(ARMGNU)-objdump -D blinker05.clang.opt.elf > blinker05.clang.opt.list - -blinker05.clang.hex : blinker05.clang.opt.elf - $(ARMGNU)-objcopy blinker05.clang.opt.elf blinker05.clang.hex -O ihex - -blinker05.clang.bin : blinker05.clang.opt.elf - $(ARMGNU)-objcopy blinker05.clang.opt.elf blinker05.clang.bin -O binary - - diff --git a/blinker05/pi2/README b/blinker05/pi2/README deleted file mode 100644 index 4b212aa..0000000 --- a/blinker05/pi2/README +++ /dev/null @@ -1,39 +0,0 @@ - -See the top level README for information on where to find the -schematic and programmers reference manual for the ARM processor -on the raspberry pi. Also find information on how to load and run -these programs. - -Same as blinker05 in the directory above, except the raspberry pi 2 -has two leds one on gpio47 the other gpio35 - -Also note to make more room for ram the raspberry pi 2 uses a base -address for peripherals of 0x3F000000 where the raspberry pi used -0x20000000. - -Also note that for the raspberry pi 2 the arm file copied from the -sd card to ram is kernel7.img the older raspberry pis still use -kernel.img. - -A new develoment late 2015 is that the raspberry pi start.elf code now -puts the rpi 2 in HYP mode. The two changes I needed to make were -to set the HVBAR, might as well set it to 0x00008000 rather than copy -the vector table to 0x00000000. so the lines up front that copied -the vector table are now replaced with remapping. - - mov r0,#0x8000 - MCR p15, 4, r0, c12, c0, 0 - -The other change being you are supposed to return from hypervisor -exceptions using the eret instruction. - - ;@subs pc,lr,#4 - eret - -For the purpose of this example my desire is to use the stock -bootcode.bin and start.elf from the raspberry pi foundation, as well as -running without a config.txt, so I have not gone backward to older -files to see if there are any nuances or changes for the rpi2 with -respect to exceptions (irq in this case). My guess is if they leave -you in supervisor mode instead of hypervisor mode, then it may work -just like it used to. diff --git a/blinker05/pi2/blinker05.c b/blinker05/pi2/blinker05.c deleted file mode 100644 index 42d2bbc..0000000 --- a/blinker05/pi2/blinker05.c +++ /dev/null @@ -1,135 +0,0 @@ - -//------------------------------------------------------------------------- -//------------------------------------------------------------------------- - -extern void PUT32 ( unsigned int, unsigned int ); -extern unsigned int GET32 ( unsigned int ); -extern void dummy ( unsigned int ); -extern void enable_irq ( void ); -extern void enable_fiq ( void ); -extern void SVCTEST ( void ); - -#define ARM_TIMER_LOD 0x3F00B400 -#define ARM_TIMER_VAL 0x3F00B404 -#define ARM_TIMER_CTL 0x3F00B408 -#define ARM_TIMER_CLI 0x3F00B40C -#define ARM_TIMER_RIS 0x3F00B410 -#define ARM_TIMER_MIS 0x3F00B414 -#define ARM_TIMER_RLD 0x3F00B418 -#define ARM_TIMER_DIV 0x3F00B41C -#define ARM_TIMER_CNT 0x3F00B420 - -#define SYSTIMERCLO 0x3F003004 -#define GPFSEL1 0x3F200004 -#define GPSET0 0x3F20001C -#define GPCLR0 0x3F200028 - -#define GPFSEL3 0x3F20000C -#define GPFSEL4 0x3F200010 -#define GPSET1 0x3F200020 -#define GPCLR1 0x3F20002C - -#define IRQ_BASIC 0x3F00B200 -#define IRQ_PEND1 0x3F00B204 -#define IRQ_PEND2 0x3F00B208 -#define IRQ_FIQ_CONTROL 0x3F00B210 -#define IRQ_ENABLE_BASIC 0x3F00B218 -#define IRQ_DISABLE_BASIC 0x3F00B224 - - -volatile unsigned int icount; - -//------------------------------------------------------------------------- -void c_irq_handler ( void ) -{ - icount++; - if(icount&1) - { - PUT32(GPSET1,1<<(47-32)); - PUT32(GPSET1,1<<(35-32)); - } - else - { - PUT32(GPCLR1,1<<(35-32)); - PUT32(GPCLR1,1<<(47-32)); - } - PUT32(ARM_TIMER_CLI,0); -} - -//------------------------------------------------------------------------- -int notmain ( void ) -{ - unsigned int ra; - - PUT32(IRQ_DISABLE_BASIC,1); - - ra=GET32(GPFSEL4); - ra&=~(7<<21); - ra|=1<<21; - PUT32(GPFSEL4,ra); - - ra=GET32(GPFSEL3); - ra&=~(7<<15); - ra|=1<<15; - PUT32(GPFSEL3,ra); - - PUT32(GPSET1,1<<(47-32)); - PUT32(GPCLR1,1<<(35-32)); - - PUT32(ARM_TIMER_CTL,0x003E0000); - PUT32(ARM_TIMER_LOD,1000000-1); - PUT32(ARM_TIMER_RLD,1000000-1); - PUT32(ARM_TIMER_DIV,0x000000F9); - PUT32(ARM_TIMER_CLI,0); - PUT32(ARM_TIMER_CTL,0x003E00A2); - - for(ra=0;ra<3;ra++) - { - PUT32(GPSET1,1<<(47-32)); - PUT32(GPCLR1,1<<(35-32)); - while(1) if(GET32(ARM_TIMER_MIS)) break; - PUT32(ARM_TIMER_CLI,0); - PUT32(GPCLR1,1<<(47-32)); - PUT32(GPSET1,1<<(35-32)); - while(1) if(GET32(ARM_TIMER_MIS)) break; - PUT32(ARM_TIMER_CLI,0); - } - - PUT32(ARM_TIMER_LOD,2000000-1); - PUT32(ARM_TIMER_RLD,2000000-1); - PUT32(ARM_TIMER_CLI,0); - PUT32(IRQ_ENABLE_BASIC,1); - for(ra=0;ra<2;ra++) - { - PUT32(GPSET1,1<<(47-32)); - PUT32(GPCLR1,1<<(35-32)); - while(1) if(GET32(IRQ_BASIC)&1) break; - PUT32(ARM_TIMER_CLI,0); - PUT32(GPCLR1,1<<(47-32)); - PUT32(GPSET1,1<<(35-32)); - while(1) if(GET32(IRQ_BASIC)&1) break; - PUT32(ARM_TIMER_CLI,0); - } - - PUT32(ARM_TIMER_LOD,4000000-1); - PUT32(ARM_TIMER_RLD,4000000-1); - icount=0; - enable_irq(); - while(1) continue; - return(0); -} -//------------------------------------------------------------------------- -//------------------------------------------------------------------------- - - -//------------------------------------------------------------------------- -// -// Copyright (c) 2012 David Welch dwelch@dwelch.com -// -// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -//------------------------------------------------------------------------- diff --git a/blinker05/pi2/memmap b/blinker05/pi2/memmap deleted file mode 100644 index 2dab497..0000000 --- a/blinker05/pi2/memmap +++ /dev/null @@ -1,11 +0,0 @@ - -MEMORY -{ - ram : ORIGIN = 0x8000, LENGTH = 0x1000 -} - -SECTIONS -{ - .text : { *(.text*) } > ram - .bss : { *(.bss*) } > ram -} diff --git a/blinker05/pi2/vectors.s b/blinker05/pi2/vectors.s deleted file mode 100644 index d461fec..0000000 --- a/blinker05/pi2/vectors.s +++ /dev/null @@ -1,74 +0,0 @@ - -;@------------------------------------------------------------------------- -;@------------------------------------------------------------------------- - -.globl _start -_start: - ldr pc,reset_handler - ldr pc,undefined_handler - ldr pc,swi_handler - ldr pc,prefetch_handler - ldr pc,data_handler - ldr pc,hyp_handler - ldr pc,irq_handler - ldr pc,fiq_handler -reset_handler: .word reset -undefined_handler: .word hang -swi_handler: .word hang -prefetch_handler: .word hang -data_handler: .word hang -hyp_handler: .word hang -irq_handler: .word irq -fiq_handler: .word hang - -reset: - mov r0,#0x8000 - MCR p15, 4, r0, c12, c0, 0 - - mov sp,#0x8000 - bl notmain -hang: b hang - -.globl PUT32 -PUT32: - str r1,[r0] - bx lr - -.globl GET32 -GET32: - ldr r0,[r0] - bx lr - -.globl dummy -dummy: - bx lr - -.globl enable_irq -enable_irq: - mrs r0,cpsr - bic r0,r0,#0x80 - msr cpsr_c,r0 - bx lr - -irq: - push {r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,lr} - bl c_irq_handler - pop {r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,lr} - ;@subs pc,lr,#4 - eret - -;@------------------------------------------------------------------------- -;@------------------------------------------------------------------------- - -;@------------------------------------------------------------------------- -;@ -;@ Copyright (c) 2012 David Welch dwelch@dwelch.com -;@ -;@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -;@ -;@ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -;@ -;@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -;@ -;@------------------------------------------------------------------------- - diff --git a/blinker05/plus/Makefile b/blinker05/plus/Makefile deleted file mode 100644 index 7bbba4c..0000000 --- a/blinker05/plus/Makefile +++ /dev/null @@ -1,70 +0,0 @@ - -ARMGNU ?= arm-none-eabi - -AOPS = --warn --fatal-warnings -COPS = -Wall -Werror -O2 -nostdlib -nostartfiles -ffreestanding - - - -gcc : blinker05.hex blinker05.bin - -all : gcc clang - -clean : - rm -f *.o - rm -f *.bin - rm -f *.hex - rm -f *.elf - rm -f *.list - rm -f *.img - rm -f *.bc - rm -f *.clang.opt.s - -vectors.o : vectors.s - $(ARMGNU)-as vectors.s -o vectors.o - -blinker05.o : blinker05.c - $(ARMGNU)-gcc $(COPS) -c blinker05.c -o blinker05.o - -blinker05.elf : memmap vectors.o blinker05.o - $(ARMGNU)-ld vectors.o blinker05.o -T memmap -o blinker05.elf - $(ARMGNU)-objdump -D blinker05.elf > blinker05.list - -blinker05.bin : blinker05.elf - $(ARMGNU)-objcopy blinker05.elf -O binary blinker05.bin - -blinker05.hex : blinker05.elf - $(ARMGNU)-objcopy blinker05.elf -O ihex blinker05.hex - - - - - - -LOPS = -Wall -m32 -emit-llvm -LLCOPS = -march=arm -mcpu=arm1176jzf-s -LLCOPS0 = -march=arm -LLCOPS1 = -march=arm -mcpu=arm1176jzf-s -COPS = -Wall -O2 -nostdlib -nostartfiles -ffreestanding -OOPS = -std-compile-opts - -clang : blinker05.clang.hex blinker05.clang.bin - - -blinker05.clang.bc : blinker05.c - clang $(LOPS) -c blinker05.c -o blinker05.clang.bc - -blinker05.clang.opt.elf : memmap vectors.o blinker05.clang.bc - opt $(OOPS) blinker05.clang.bc -o blinker05.clang.opt.bc - llc $(LLCOPS) blinker05.clang.opt.bc -o blinker05.clang.opt.s - $(ARMGNU)-as blinker05.clang.opt.s -o blinker05.clang.opt.o - $(ARMGNU)-ld -o blinker05.clang.opt.elf -T memmap vectors.o blinker05.clang.opt.o - $(ARMGNU)-objdump -D blinker05.clang.opt.elf > blinker05.clang.opt.list - -blinker05.clang.hex : blinker05.clang.opt.elf - $(ARMGNU)-objcopy blinker05.clang.opt.elf blinker05.clang.hex -O ihex - -blinker05.clang.bin : blinker05.clang.opt.elf - $(ARMGNU)-objcopy blinker05.clang.opt.elf blinker05.clang.bin -O binary - - diff --git a/blinker05/plus/README b/blinker05/plus/README deleted file mode 100644 index c50e9ea..0000000 --- a/blinker05/plus/README +++ /dev/null @@ -1,12 +0,0 @@ - -See the top level README for information on where to find the -schematic and programmers reference manual for the ARM processor -on the raspberry pi. Also find information on how to load and run -these programs. - -Same as blinker05 in the directory above, except the raspberry pi 1 -A+ and B+ have two leds one on gpio47 the other gpio35. - -I tested this on an A+. I probably have a B+ around somewhere, but -not sure where. The A+ does appear to have two leds and they are both -blinking. diff --git a/blinker05/plus/blinker05.c b/blinker05/plus/blinker05.c deleted file mode 100644 index 8bd5e2b..0000000 --- a/blinker05/plus/blinker05.c +++ /dev/null @@ -1,132 +0,0 @@ - -//------------------------------------------------------------------------- -//------------------------------------------------------------------------- - -extern void PUT32 ( unsigned int, unsigned int ); -extern unsigned int GET32 ( unsigned int ); -extern void dummy ( unsigned int ); -extern void enable_irq ( void ); -extern void enable_fiq ( void ); - - -#define ARM_TIMER_LOD 0x2000B400 -#define ARM_TIMER_VAL 0x2000B404 -#define ARM_TIMER_CTL 0x2000B408 -#define ARM_TIMER_CLI 0x2000B40C -#define ARM_TIMER_RIS 0x2000B410 -#define ARM_TIMER_MIS 0x2000B414 -#define ARM_TIMER_RLD 0x2000B418 -#define ARM_TIMER_DIV 0x2000B41C -#define ARM_TIMER_CNT 0x2000B420 - -#define SYSTIMERCLO 0x20003004 -#define GPFSEL1 0x20200004 -#define GPSET0 0x2020001C -#define GPCLR0 0x20200028 -#define GPFSEL3 0x2020000C -#define GPFSEL4 0x20200010 -#define GPSET1 0x20200020 -#define GPCLR1 0x2020002C - -#define IRQ_BASIC 0x2000B200 -#define IRQ_PEND1 0x2000B204 -#define IRQ_PEND2 0x2000B208 -#define IRQ_FIQ_CONTROL 0x2000B210 -#define IRQ_ENABLE_BASIC 0x2000B218 -#define IRQ_DISABLE_BASIC 0x2000B224 - -volatile unsigned int icount; - -//------------------------------------------------------------------------- -void c_irq_handler ( void ) -{ - icount++; - if(icount&1) - { - PUT32(GPSET1,1<<(47-32)); - PUT32(GPSET1,1<<(35-32)); - } - else - { - PUT32(GPCLR1,1<<(47-32)); - PUT32(GPCLR1,1<<(35-32)); - } - PUT32(ARM_TIMER_CLI,0); -} -//------------------------------------------------------------------------- -int notmain ( void ) -{ - unsigned int ra; - - PUT32(IRQ_DISABLE_BASIC,1); - - ra=GET32(GPFSEL4); - ra&=~(7<<21); - ra|=1<<21; - PUT32(GPFSEL4,ra); - - ra=GET32(GPFSEL3); - ra&=~(7<<15); - ra|=1<<15; - PUT32(GPFSEL3,ra); - - PUT32(GPSET1,1<<(47-32)); - PUT32(GPCLR1,1<<(35-32)); - - PUT32(ARM_TIMER_CTL,0x003E0000); - PUT32(ARM_TIMER_LOD,1000000-1); - PUT32(ARM_TIMER_RLD,1000000-1); - PUT32(ARM_TIMER_DIV,0x000000F9); - PUT32(ARM_TIMER_CLI,0); - PUT32(ARM_TIMER_CTL,0x003E00A2); - - for(ra=0;ra<2;ra++) - { - PUT32(GPSET1,1<<(47-32)); - PUT32(GPCLR1,1<<(35-32)); - while(1) if(GET32(ARM_TIMER_MIS)) break; - PUT32(ARM_TIMER_CLI,0); - PUT32(GPCLR1,1<<(47-32)); - PUT32(GPSET1,1<<(35-32)); - while(1) if(GET32(ARM_TIMER_MIS)) break; - PUT32(ARM_TIMER_CLI,0); - } - - PUT32(ARM_TIMER_LOD,2000000-1); - PUT32(ARM_TIMER_RLD,2000000-1); - PUT32(ARM_TIMER_CLI,0); - PUT32(IRQ_ENABLE_BASIC,1); - for(ra=0;ra<2;ra++) - { - PUT32(GPSET1,1<<(47-32)); - PUT32(GPCLR1,1<<(35-32)); - while(1) if(GET32(IRQ_BASIC)&1) break; - PUT32(ARM_TIMER_CLI,0); - PUT32(GPCLR1,1<<(47-32)); - PUT32(GPSET1,1<<(35-32)); - while(1) if(GET32(IRQ_BASIC)&1) break; - PUT32(ARM_TIMER_CLI,0); - } - - PUT32(ARM_TIMER_LOD,4000000-1); - PUT32(ARM_TIMER_RLD,4000000-1); - icount=0; - enable_irq(); - while(1) continue; - return(0); -} -//------------------------------------------------------------------------- -//------------------------------------------------------------------------- - - -//------------------------------------------------------------------------- -// -// Copyright (c) 2012 David Welch dwelch@dwelch.com -// -// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -//------------------------------------------------------------------------- diff --git a/blinker05/plus/memmap b/blinker05/plus/memmap deleted file mode 100644 index 2dab497..0000000 --- a/blinker05/plus/memmap +++ /dev/null @@ -1,11 +0,0 @@ - -MEMORY -{ - ram : ORIGIN = 0x8000, LENGTH = 0x1000 -} - -SECTIONS -{ - .text : { *(.text*) } > ram - .bss : { *(.bss*) } > ram -} diff --git a/blinker05/plus/vectors.s b/blinker05/plus/vectors.s deleted file mode 100644 index 9f0aeb8..0000000 --- a/blinker05/plus/vectors.s +++ /dev/null @@ -1,96 +0,0 @@ - -;@------------------------------------------------------------------------- -;@------------------------------------------------------------------------- - -.globl _start -_start: - ldr pc,reset_handler - ldr pc,undefined_handler - ldr pc,swi_handler - ldr pc,prefetch_handler - ldr pc,data_handler - ldr pc,unused_handler - ldr pc,irq_handler - ldr pc,fiq_handler -reset_handler: .word reset -undefined_handler: .word hang -swi_handler: .word hang -prefetch_handler: .word hang -data_handler: .word hang -unused_handler: .word hang -irq_handler: .word irq -fiq_handler: .word hang - -reset: - mov r0,#0x8000 - mov r1,#0x0000 - ldmia r0!,{r2,r3,r4,r5,r6,r7,r8,r9} - stmia r1!,{r2,r3,r4,r5,r6,r7,r8,r9} - ldmia r0!,{r2,r3,r4,r5,r6,r7,r8,r9} - stmia r1!,{r2,r3,r4,r5,r6,r7,r8,r9} - - - ;@ (PSR_IRQ_MODE|PSR_FIQ_DIS|PSR_IRQ_DIS) - mov r0,#0xD2 - msr cpsr_c,r0 - mov sp,#0x8000 - - ;@ (PSR_FIQ_MODE|PSR_FIQ_DIS|PSR_IRQ_DIS) - mov r0,#0xD1 - msr cpsr_c,r0 - mov sp,#0x4000 - - ;@ (PSR_SVC_MODE|PSR_FIQ_DIS|PSR_IRQ_DIS) - mov r0,#0xD3 - msr cpsr_c,r0 - mov sp,#0x8000000 - - ;@ SVC MODE, IRQ ENABLED, FIQ DIS - ;@mov r0,#0x53 - ;@msr cpsr_c, r0 - - bl notmain -hang: b hang - -.globl PUT32 -PUT32: - str r1,[r0] - bx lr - -.globl GET32 -GET32: - ldr r0,[r0] - bx lr - -.globl dummy -dummy: - bx lr - -.globl enable_irq -enable_irq: - mrs r0,cpsr - bic r0,r0,#0x80 - msr cpsr_c,r0 - bx lr - -irq: - push {r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,lr} - bl c_irq_handler - pop {r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,lr} - subs pc,lr,#4 - -;@------------------------------------------------------------------------- -;@------------------------------------------------------------------------- - -;@------------------------------------------------------------------------- -;@ -;@ Copyright (c) 2012 David Welch dwelch@dwelch.com -;@ -;@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -;@ -;@ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -;@ -;@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -;@ -;@------------------------------------------------------------------------- -