nminaylov/F1C100s_projects

simpleloader boot issue

Closed this issue · 3 comments

sbsrb commented

Hi there ,
I am trying to use F1C100s simpleloader app.
Everything links perfect then i fix eGON.BT0 header and finally writes it at spi flash address 0. When i re-boot F1C100 seems like it never enters main function or can not finish sys_clk_init() as i don't see any output on uart0.

I was wondering if you can give any ideas....

Thanks,Rishi

Hi,
Are you sure that your app was loaded and started by BROM (first stage loader)?
If there is some problem with header/checksum the BROM will fall into FEL mode. You can try to connect your board to PC, if it is detected as USB device then it means that BROM failed to load your app and is in FEL mode now.
Also, you can try to decrease PLL_CPU multiplier in sys_clk_init, maybe CPU frequency is too high. I haven't found any official information about maximum CPU frequency, my board works well at 720MHz.

So, i've compiled and checked it on my board, it started successfully. You can try flashing this file
simple_loader.zip

sbsrb commented

Thank you so much for your prompt response.
Yes the image you sent worked great! and finally my image also booted :) I switched to mksunxi tool in your repository/tools folder. Before i don't know i downloaded it somewhere from web but seems like that was the issue.

I really want to appreciate your effort in this project its really so nice and a great start for baremetal on F1C100. As i am coming from ST world you code structure and function naming seems so near and identical of what i am comfortable with.

Once i am done with my first project on F1C100 i would like to see if i can find and add usb device support as well. But but not now probably in near future.

Best Regards,Thanks, Rishi