Boot own code from sdcard - whats missing please

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Boot own code from sdcard - whats missing please

ソリューションへジャンプ
1,123件の閲覧回数
johnballance
Contributor III

Hi

I am attempting to load a custom OS from SDcard. I have a SDCard boot loader that uses the IVT etc to initialise the dram, then load a kernel at 0x17800000 in dram.

If I paste a linux kernel on the end of this it runs, so I know ram is set up and the kernel is put in the right place to execute.

I then put my minimal kernel in place of the linux kernel and see nothing.

I am attempting to send something via the serial port but must be missing something.

What I do is:

1: set AIPS1_MPR0to7 and 8to15 to 0x77777777 to turn on unbuffered write access to all masters. the same for AIPS2

2: set all the AIPSx_OPACR registers to 0 to unbuffered un priveledged write to all peripherals

3: set pads PAD_CTL for _EIM_D19/20 and CSI0_DAT10/11 to 0x1b0b0  (the 4 pins in use

4: set MUX_CTL for CSI0_DAT10/11 to 3 (alt_3)

5: set UART1_IPP_UART_RXD and UART_RTS_B to 1

6: clear bottom 6 bits of CCM_CSCDR1 to set uartpodf divider to 1

7: set CCM_CCGR5 bits 24-27 to enable uart clocks

then

8: usual uart setup, with known working routines.

What have I missed???  I cannot get any toggling of serial output pin

THanks in hope

ラベル(2)
0 件の賞賛
返信
1 解決策
1,014件の閲覧回数
johnballance
Contributor III

To answer my own Q: What I posted above is basically correct. I got caught out by setting UART1_IPP_UART_RXD to the wong mux setting for my board.  needed to be 0!

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,014件の閲覧回数
LeonardoSandova
Specialist I

Have you tried loading that minimal kernel with u-boot?

Leo

0 件の賞賛
返信
1,014件の閲覧回数
johnballance
Contributor III

I can load a full linux OK.. both with my loader and with the uboot loader, so I know I can get an image into dram and enter it.

As linux is not an option, I would like to set up a simple serial o/p before I start dealing with cache and mmu setup.  This is where I've fallen over. I cannot compile the example code supplied, and anyway that is set to load at the start of the internal ram ATM.

I have implemented, as far as I can tell, all that is shown in the example.  still nothing appears.

Hence the Q ..

so: what I KNOW .. binary image is placed correctly in dram at 0x17800000

it is entered.

it fails to do anything. Therefore have I missed a critical element in setting up what I've done.. Do you know anyone who could peek at the flow I gave?

Thanks

John

0 件の賞賛
返信
1,015件の閲覧回数
johnballance
Contributor III

To answer my own Q: What I posted above is basically correct. I got caught out by setting UART1_IPP_UART_RXD to the wong mux setting for my board.  needed to be 0!

0 件の賞賛
返信