On 02/28/2020 08:50 AM, gianluca wrote:
Now it compiles with the gcc version 7.3.1 20180622 (release)
[ARM/embedded-7-branch revision 261907] (GNU Tools for Arm Embedded
Processors 7-2018-q2-update).
Built build/stm32mp1/debug/tf-a-stm32mp157c-dk2.bin successfully
Generated build/stm32mp1/debug/tf-a-stm32mp157c-dk2.stm32
tools/stm32image/stm32image -s
./build/stm32mp1/debug/tf-a-stm32mp157c-dk2.bin -d
build/stm32mp1/debug/tf-a-stm32mp157c-dk2.stm32 -l 0x000000002ffc2500 -e
0x000000002ffd8000 -v 0
Image Type : ST Microelectronics STM32 V1.0
Image Size : 245128 bytes
Image Load : 0x2ffc2500
Entry Point : 0x2ffd8000
Checksum : 0x00ebe57e
Option : 0x00000001
Version : 0x00000000
Now having the following .tsv file:
#Opt Id Name Type IP Offset Binary
- 0x01 fsbl1-boot Binary none 0x0 tf-a-stm32mp157c-dk2.stm32
- 0x03 ssbl-boot Binary none 0x0 barebox-stm32mp157c-dk2.img
The STM32_Programmer_CLI cmdline gives those messages:
---> (cmdline) STM32_Programmer_CLI -c port=usb1 -w
stm32mp157c-dk2.tsv <---
-------------------------------------------------------------------
STM32CubeProgrammer v2.3.0
-------------------------------------------------------------------
USB speed : High Speed (480MBit/s)
Manuf. ID : STMicroelectronics
Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
SN : 0022002B3338510534383330
FW version : 0x0110
Device ID : 0x0500
Device name : STM32MPxxx
Device type : MPU
Device CPU : Cortex-A7
Start Embedded Flashing service
Memory Programming ...
Opening and parsing file: tf-a-stm32mp157c-dk2.stm32
File : tf-a-stm32mp157c-dk2.stm32
Size : 245384 Bytes
Partition ID : 0x01
Download in Progress:
[==================================================] 100%
File download complete
Time elapsed during download operation: 00:00:00.830
RUNNING Program ...
PartID: :0x01
Start operation done successfully at partition 0x01
Flashlayout Programming ...
[==================================================] 100%
Running Flashlayout Partition ...
Flashlayout partition started successfully
Memory Programming ...
Opening and parsing file: barebox-stm32mp157c-dk2.img
File : barebox-stm32mp157c-dk2.img
Size : 284074 Bytes
Partition ID : 0x03
Download in Progress:
[==================================================] 100%
File download complete
Time elapsed during download operation: 00:00:00.232
RUNNING Program ...
PartID: :0x03
reconnecting the device ...
Error: unable to reconnect the target device: time out expired
Error: Start operation failed at partition 0x03
Error: TSV flashing service failed
So in the console debug (via ttyACM usb gadget) I have these messages:
NOTICE: CPU: STM32MP157CAC Rev.B
NOTICE: Model: STMicroelectronics STM32MP157C-DK2 Discovery Board
NOTICE: Board: MB1272 Var2 Rev.C-01
INFO: Reset reason (0x14):
INFO: Pad Reset from NRST
INFO: PMIC version = 0x10
INFO: Using USB
INFO: Instance 2
INFO: Boot used partition fsbl1
NOTICE: BL2: v2.0-r3.0(debug):v2.0-stm32mp-r3
NOTICE: BL2: Built : 08:44:36, Feb 28 2020
INFO: BL2: Doing platform setup
INFO: RAM: DDR3-1066/888 bin G 1x4Gb 533MHz v1.45
INFO: Memory size = 0x20000000 (512 MB)
INFO: BL2 runs SP_MIN setup
INFO: BL2: Loading image id 4
INFO: Loading image id=4 at address 0x2ffef000
INFO: Image id=4 loaded: 0x2ffef000 - 0x30000000
INFO: BL2: Loading image id 5
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: UPLOAD :
INFO: Phase ID : 0
INFO: address 0x2ffed78c
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: UPLOAD :
INFO: Phase ID : 0
INFO: address 0x2ffed78c
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: Start Download partition 0 to address 0xc0000000 length 0
INFO: USB : DFU : end of download partition : 0
INFO: Loading image id=5 at address 0xc0100000
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: UPLOAD :
INFO: Phase ID : 3
INFO: address 0x2ffed78c
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: receive request 6
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: UPLOAD :
INFO: Phase ID : 3
INFO: address 0x2ffed78c
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: usb_partition_size: partition size : 0x454aa
INFO: Start Download partition 3 to address 0xc0100000 length 283818
INFO: USB : DFU : end of download partition : 3
WARNING: Skip signature check (header option)
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: UPLOAD :
INFO: Phase ID : 0
INFO: address 0xffffffff
INFO: Send detach request
INFO: GETSTATUS :
INFO: DFU_STATE_IDLE
INFO: Receive Detach
INFO: Image id=5 loaded: 0xc0100000 - 0xc01454aa
NOTICE: BL2: Booting BL32
INFO: Entry point address = 0x2ffef000
INFO: SPSR = 0x1d3
NOTICE: SP_MIN: v2.0-r3.0(debug):v2.0-stm32mp-r3
NOTICE: SP_MIN: Built : 08:44:45, Feb 28 2020
INFO: ARM GICv2 driver initialized
INFO: stm32mp HSI (18): Secure only
INFO: stm32mp HSE (20): Secure only
INFO: stm32mp PLL2 (27): Secure only
INFO: stm32mp PLL2_R (30): Secure only
INFO: SP_MIN: Initializing runtime services
INFO: SP_MIN: Preparing exit to normal world
So it seems it hangs on running or transferring Barebox as SSBL... Or
the Barebox output is not the same as TF-A...
The Barebox is 2020.01.0, the steps to build it are:
1- make ARCH=arm stm32mp_defconfig
2- make ARCH=arm all
CHK include/generated/version.h
CHK include/generated/utsrelease.h
CREATE include/config.h
CHK include/generated/compile.h
ENV defaultenv/barebox_default_env
ENV defaultenv/defaultenv-2-base.bbenv
ENV defaultenv/defaultenv-2-menu.bbenv
CHKFILESIZE images/start_stm32mp157c_dk2.pblb
LN images/../barebox-flash-image
images built:
barebox-stm32mp157c-dk2.img
So the SSBL the .tsv file is referring to is the last build of Barebox.
Any hint? Clue? or whatever?
Is the console output of Barebox in the stm32mp_defconfig routed to the
same RX & TX pins for the ttyACM as for the TF-A components?
Gianluca
--
Eurek s.r.l. |
Electronic Engineering | http://www.eurek.it
via Celletta 8/B, 40026 Imola, Italy | Phone: +39-(0)542-609120
p.iva 00690621206 - c.f. 04020030377 | Fax: +39-(0)542-609212
_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox