Jump to content
    

allwinner f1c100

Начинаю осваивать данный микроконтроллер. Без проблем запустил программы в оперативную память и запустил. Столкнулся с проблемой. Не могу запустить их во флеш.

 

bootloader брал отсюда: https://github.com/nminaylov/F1C100s_projects   

Скомпилировал simple_loader командой make.

Далее попробовал загрузить во флеш:

xfel spinand erase 0x0 0x10000

xfel spinand write  0x0 build/simple_loader.bin

Вопрос: Какая последовательность действий должна быть, чтобы правильно загрузить bootloader и  основную программу?

Edited by paprikun

Share this post


Link to post
Share on other sites

51 минуту назад, paprikun сказал:

xfel spinand erase 0x0 0x10000

А флеш точно NAND? Может NOR?

И разве для F100 используется xfel а не  sunxi-fel ?

Edited by mantech

Share this post


Link to post
Share on other sites

Я отктился до рабочей версии, где есть bootloader и линукс и возможность запускаться из оперативки.  Пробовал перетерть линукс своей программой, но безуспешно.

Share this post


Link to post
Share on other sites

1 hour ago, paprikun said:

Я отктился до рабочей версии, где есть bootloader и линукс и возможность запускаться из оперативки.  Пробовал перетерть линукс своей программой, но безуспешно.

Как я грузил в оперативку:

- Включил устройство. Зашел в терминал 

picocom -b 115200 /dev/ttyUSB0

- Несколько раз нажал Enter. Приостановил загрузу ОС. В терминале ввел 

loady 80000000

- В другом терминале зашел в папку проекта hello_led. Собрал его командой make в терминале.

-  sx --ymodem build/hello_led.bin > /dev/ttyUSB0 < /dev/ttyUSB0

- В первом терминале ввел go 80000000 и программа запустилась.

 

Вот порядок дейтсвий предлогаемых в git https://github.com/nminaylov/F1C100s_projects:

With simple_loader

  • Compile simple_loader project
  • Use mksunxi tool to fix eGON.BT0 header in simple_loader.bin
  • Flash simple_loader.bin to SPI flash at offset 0, using U-Boot or FEL mode
  • Compile your project with -DLOAD_HEADER option (enabled by default in all projects)
  • Flash your code to SPI flash at offset 0x10000

 

Что делал я:

- Зашел в папку проекта simple_loader. Собрал его командой make в терминале.

- Далее в терминале xfel spinand write 0x0 build/simple_loader.bin

- Далее  зашел в папку проекта hello_led. Собрал его командой make в терминале.

- Далее в терминале xfel spinand write 0x10000 build/hello_led.bin

И ничего не запустилось.

 

 

 

 

Edited by paprikun

Share this post


Link to post
Share on other sites

Консоль на allwinner

 

 

port is        : /dev/ttyUSB0
flowcontrol    : none
baudrate is    : 115200
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
hangup is      : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        : 
omap is        : 
emap is        : crcrlf,delbs,
logfile is     : none
initstring     : none
exit_after is  : not set
exit is        : no

Type [C-a] [C-h] to see available commands
Terminal ready
MMC:   mmc@1c0f000: 0, mmc@1c10000: 1
Setting up a 800x480 lcd console (overscan 0x0)
In:    serial
Out:   serial
Err:   serial
Allwinner mUSB OTG (Peripheral)
Hit any key to stop autoboot:  0 
Card did not respond to voltage select!
Card did not respond to voltage select!
unrecognized JEDEC id bytes: ff, c8, f1
Failed to initialize SPI flash at 0:0 (error -2)
List of MTD devices:
* spi-nand0
  - device: spi-nand@1
  - parent: spi@1c05000
  - driver: spi_nand
  - type: NAND flash
  - block size: 0x20000 bytes
  - min I/O: 0x800 bytes
  - OOB size: 64 bytes
  - OOB available: 31 bytes
  - 0x000000000000-0x000008000000 : "spi-nand0"
=========================
Boot Device: spi
Boot Slot 0: empty
Boot Slot 1: spi-nand
=========================
DFU waiting on SPI-NAND...

U-Boot SPL 2020.07 (May 11 2021 - 10:38:20 +0800)
DRAM: 64 MiB
Trying to boot from MMC1
Card did not respond to voltage select!
spl: mmc init failed with error: -95
Trying to boot from MMC2
Card did not respond to voltage select!
spl: mmc init failed with error: -95
Trying to boot from sunxi SPI
SPI-NAND: GigaDevice GD5F1GQ4UAYIG
SPI-NAND: U-Boot address: 53248


U-Boot 2020.07 (May 11 2021 - 10:38:20 +0800) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Allwinner F1C100s Generic Device
DRAM:  64 MiB
MMC:   mmc@1c0f000: 0, mmc@1c10000: 1
Setting up a 800x480 lcd console (overscan 0x0)
In:    serial
Out:   serial
Err:   serial
Allwinner mUSB OTG (Peripheral)
Hit any key to stop autoboot:  0 

 

Edited by paprikun

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...