Does anybody has a boot sequence in assembler source code (boot sequence) at hand, which configures any of the Sharp micro controllers of type LH75400, LH75401, LH75410 or LH75411 ?
I assume the Sharp "bluestreak library" supports these chips? (I use the LH79520). It's a useful resource for getting things up and running, pinching initialisation sequences, register names etc.
yes, this is right. Actually I am trying to use the startup sequence given in the library. Nevertheless, I am facing some problems. I compiled the kev..._startup.asm and linked it to my C programme. The assembly source shows this:
Disassembly of section .text:
00000000 ea000006 b 00000020
00000004 ea000004 b 0000001c
00000008 ea000003 b 0000001c
0000000c ea000002 b 0000001c
00000010 ea000001 b 0000001c
00000014 e1a00000 nop (mov r0,r0)
00000018 e51ffff0 ldr pc, [pc, #-4080] ; fffff030
I am loading this into the internal SRAM via JTAG and step through it. Since my FlashRam is not working yet, I have to start the programme at address 0x0 manually (BTW: which processor mode should I use?). As you see in the code, from adress 0x0 it jumps to 0x20 which holds the instruction "ldr r0, [pc, #232]". Actually, this instruction fails! The JTAG programme (OCD Debugger) says: "Processor running" and if I halt the device, the cpu shows an undefined state (Processor mode is
0x0).
How this? Did I forget something? Stack settings probably? But all this should be handled by the startup sequence!
_runtime: _reset: b init_stacks _undefined: b _undefined _swi: b osSWIint _prefetch_abort: b _prefetch_abort _data_abort: b _data_abort nop /* reserved location */ _irq: /* take vectored interrupt */ ldr pc,[pc,#-0xff0] _fiq: b _fiq_handler init_stacks: /* --- Initialize stack pointer registers */ /* Enter IRQ mode and set up the IRQ stack pointer */ MOV r0, #Mode_IRQ orr r0,r0,#I_Bit orr r0,r0,#F_Bit /* No interrupts */ MSR cpsr_c, r0 LDR sp, =IRQ_Stack
/* Enter FIQ mode and set up the FIQ stack pointer */ MOV r0, #Mode_FIQ orr r0,r0,#I_Bit orr r0,r0,#F_Bit /* No interrupts */ MSR cpsr_c, r0 LDR sp, =FIQ_Stack
/* Enter ABT mode and set up the ABT stack pointer */ MOV r0, #Mode_ABT orr r0,r0,#I_Bit orr r0,r0,#F_Bit /* No interrupts */ MSR cpsr_c, r0 LDR sp, =ABT_Stack
/* Enter IRQ mode and set up the IRQ stack pointer */ MOV r0, #Mode_UNDEF orr r0,r0,#I_Bit orr r0,r0,#F_Bit /* No interrupts */ MSR cpsr_c, r0 LDR sp, =UNDEF_Stack
/* Set up the SVC stack pointer last and return to SVC mode */ MOV r0, #Mode_SVC orr r0,r0,#I_Bit orr r0,r0,#F_Bit /* No interrupts */ MSR cpsr_c, r0 LDR sp, =SVC_Stack
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.