* u-boot 2022-07 on STM32F746G-DISCO
@ 2022-09-19 10:19 Waldemar Brodkorb
2022-09-19 11:48 ` Waldemar Brodkorb
0 siblings, 1 reply; 14+ messages in thread
From: Waldemar Brodkorb @ 2022-09-19 10:19 UTC (permalink / raw)
To: U-Boot Mailing List
Hi,
I am trying to run u-boot on a STM32F746G-DISCO device.
I am configuring u-boot with stm32f746-disco_spl_defconfig.
I use following openocd command to flash the output of the build:
openocd \
-f interface/stlink.cfg -f board/stm32f7discovery.cfg \
-c "init" \
-c "reset init" \
-c "flash probe 0" \
-c "flash info 0" \
-c "flash write_image erase u-boot-spl.bin 0x08000000" \
-c "flash write_image erase u-boot-dtb.bin 0x08008000" \
-c "reset run" \
-c "shutdown"
The output looks like:
Open On-Chip Debugger 0.11.0
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Warn : Interface already configured, ignoring
Error: already specified hl_layout stlink
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : clock speed 2000 kHz
Info : STLINK V2J25M14 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.240633
Warn : Silicon bug: single stepping may enter pending exception handler!
Info : stm32f7x.cpu: hardware has 8 breakpoints, 4 watchpoints
Info : starting gdb server for stm32f7x.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080003fc msp: 0x20050000
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : device id = 0x10016449
Info : flash size = 1024 kbytes
flash 'stm32f2x' found at 0x08000000
#0 : stm32f2x at 0x08000000, size 0x00100000, buswidth 0, chipwidth 0
# 0: 0x00000000 (0x8000 32kB) not protected
# 1: 0x00008000 (0x8000 32kB) not protected
# 2: 0x00010000 (0x8000 32kB) not protected
# 3: 0x00018000 (0x8000 32kB) not protected
# 4: 0x00020000 (0x20000 128kB) not protected
# 5: 0x00040000 (0x40000 256kB) not protected
# 6: 0x00080000 (0x40000 256kB) not protected
# 7: 0x000c0000 (0x40000 256kB) not protected
STM32F7[4|5]x - Rev: Z
auto erase enabled
wrote 32768 bytes from file u-boot-spl.bin in 0.802971s (39.852 KiB/s)
auto erase enabled
wrote 491520 bytes from file u-boot-dtb.bin in 8.638284s (55.567 KiB/s)
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
shutdown command invoked
But nothing happens on the LCD nor on the serial console.
I use screen /dev/ttyACM0 115200 under Linux to connect.
Is ttyACM0 the wrong device to get u-boots serial output?
I have only one USB cable connected between USB ST-Link and my laptop.
What I am doing wrong?
best regards
Waldemar
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: u-boot 2022-07 on STM32F746G-DISCO
2022-09-19 10:19 u-boot 2022-07 on STM32F746G-DISCO Waldemar Brodkorb
@ 2022-09-19 11:48 ` Waldemar Brodkorb
2022-09-19 14:33 ` Patrice CHOTARD
` (3 more replies)
0 siblings, 4 replies; 14+ messages in thread
From: Waldemar Brodkorb @ 2022-09-19 11:48 UTC (permalink / raw)
To: Waldemar Brodkorb; +Cc: U-Boot Mailing List
Hi again,
Waldemar Brodkorb wrote,
> Hi,
>
> I am trying to run u-boot on a STM32F746G-DISCO device.
> I am configuring u-boot with stm32f746-disco_spl_defconfig.
>
> But nothing happens on the LCD nor on the serial console.
> I use screen /dev/ttyACM0 115200 under Linux to connect.
It seems my USB port on my laptop was buggy, after reboot I get
following output via serial console:
U-Boot SPL 2022.07 (Sep 19 2022 - 13:20:08 +0200)
Trying to boot from XIP
U-Boot 2022.07 (Sep 19 2022 - 13:20:08 +0200)
Model: STMicroelectronics STM32F746-DISCO board
DRAM: 8 MiB
Hard fault
pc : 080087d6 lr : c05aa775 xPSR : a1000000
r12 : 00000010 r3 : 080087c1 r2 : 0805344d
r1 : 08008001 r0 : c05aa000
Resetting CPU ...
resetting ...
I get a Hard fault. I then tried an older version of u-boot using
the information from https://github.com/fdu/STM32F746G-disco_Buildroot
as a hint. With U-Boot 2018.11 I get a working binary (I had to
disable Falcon mode):
U-Boot SPL 2018.11 (Sep 19 2022 - 13:41:50 +0200)
Trying to boot from XIP
U-Boot 2018.11 (Sep 19 2022 - 13:41:50 +0200)
Model: STMicroelectronics STM32F746-DISCO board
DRAM: 8 MiB
Flash: 1 MiB
MMC: sdio@40012c00: 0
In: serial
Out: serial
Err: serial
usr button is at LOW LEVEL
Net:
Warning: ethernet@40028000 (eth0) using random MAC address -
fe:f8:94:5f:5e:26
eth0: ethernet@40028000
Hit SPACE in 3 seconds to stop autoboot.
Wrong Image Format for bootm command
ERROR: can't get kernel image!
U-Boot >
Seems like a regression to me.
best regards
Waldemar
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: u-boot 2022-07 on STM32F746G-DISCO
2022-09-19 11:48 ` Waldemar Brodkorb
@ 2022-09-19 14:33 ` Patrice CHOTARD
2022-09-19 14:35 ` Patrice CHOTARD
` (2 subsequent siblings)
3 siblings, 0 replies; 14+ messages in thread
From: Patrice CHOTARD @ 2022-09-19 14:33 UTC (permalink / raw)
To: u-boot
Hi Waldemar
On 9/19/22 13:48, Waldemar Brodkorb wrote:
> Hi again,
>
> Waldemar Brodkorb wrote,
>
>> Hi,
>>
>> I am trying to run u-boot on a STM32F746G-DISCO device.
>> I am configuring u-boot with stm32f746-disco_spl_defconfig.
>>
>> But nothing happens on the LCD nor on the serial console.
>> I use screen /dev/ttyACM0 115200 under Linux to connect.
>
> It seems my USB port on my laptop was buggy, after reboot I get
> following output via serial console:
>
> U-Boot SPL 2022.07 (Sep 19 2022 - 13:20:08 +0200)
> Trying to boot from XIP
>
>
> U-Boot 2022.07 (Sep 19 2022 - 13:20:08 +0200)
>
> Model: STMicroelectronics STM32F746-DISCO board
> DRAM: 8 MiB
> Hard fault
> pc : 080087d6 lr : c05aa775 xPSR : a1000000
> r12 : 00000010 r3 : 080087c1 r2 : 0805344d
> r1 : 08008001 r0 : c05aa000
> Resetting CPU ...
>
> resetting ...
>
> I get a Hard fault. I then tried an older version of u-boot using
> the information from https://github.com/fdu/STM32F746G-disco_Buildroot
> as a hint. With U-Boot 2018.11 I get a working binary (I had to
> disable Falcon mode):
>
> U-Boot SPL 2018.11 (Sep 19 2022 - 13:41:50 +0200)
> Trying to boot from XIP
>
>
> U-Boot 2018.11 (Sep 19 2022 - 13:41:50 +0200)
>
> Model: STMicroelectronics STM32F746-DISCO board
> DRAM: 8 MiB
> Flash: 1 MiB
> MMC: sdio@40012c00: 0
> In: serial
> Out: serial
> Err: serial
> usr button is at LOW LEVEL
> Net:
> Warning: ethernet@40028000 (eth0) using random MAC address -
> fe:f8:94:5f:5e:26
> eth0: ethernet@40028000
> Hit SPACE in 3 seconds to stop autoboot.
> Wrong Image Format for bootm command
> ERROR: can't get kernel image!
> U-Boot >
>
> Seems like a regression to me.
>
> best regards
> Waldemar
There are several issues with SPL with STM32F7 based boards.
I am currently working on it.
A series will be submitted very soon ;-)
Patrice
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: u-boot 2022-07 on STM32F746G-DISCO
2022-09-19 11:48 ` Waldemar Brodkorb
2022-09-19 14:33 ` Patrice CHOTARD
@ 2022-09-19 14:35 ` Patrice CHOTARD
2022-09-19 14:36 ` Patrice CHOTARD
2022-09-19 21:09 ` Simon Glass
3 siblings, 0 replies; 14+ messages in thread
From: Patrice CHOTARD @ 2022-09-19 14:35 UTC (permalink / raw)
To: Waldemar Brodkorb; +Cc: U-Boot Mailing List
I forgot to mention that information can be directly found
in doc/board/st/stm32_MCU.rst
Patrice
On 9/19/22 13:48, Waldemar Brodkorb wrote:
> Hi again,
>
> Waldemar Brodkorb wrote,
>
>> Hi,
>>
>> I am trying to run u-boot on a STM32F746G-DISCO device.
>> I am configuring u-boot with stm32f746-disco_spl_defconfig.
>>
>> But nothing happens on the LCD nor on the serial console.
>> I use screen /dev/ttyACM0 115200 under Linux to connect.
>
> It seems my USB port on my laptop was buggy, after reboot I get
> following output via serial console:
>
> U-Boot SPL 2022.07 (Sep 19 2022 - 13:20:08 +0200)
> Trying to boot from XIP
>
>
> U-Boot 2022.07 (Sep 19 2022 - 13:20:08 +0200)
>
> Model: STMicroelectronics STM32F746-DISCO board
> DRAM: 8 MiB
> Hard fault
> pc : 080087d6 lr : c05aa775 xPSR : a1000000
> r12 : 00000010 r3 : 080087c1 r2 : 0805344d
> r1 : 08008001 r0 : c05aa000
> Resetting CPU ...
>
> resetting ...
>
> I get a Hard fault. I then tried an older version of u-boot using
> the information from https://github.com/fdu/STM32F746G-disco_Buildroot
> as a hint. With U-Boot 2018.11 I get a working binary (I had to
> disable Falcon mode):
>
> U-Boot SPL 2018.11 (Sep 19 2022 - 13:41:50 +0200)
> Trying to boot from XIP
>
>
> U-Boot 2018.11 (Sep 19 2022 - 13:41:50 +0200)
>
> Model: STMicroelectronics STM32F746-DISCO board
> DRAM: 8 MiB
> Flash: 1 MiB
> MMC: sdio@40012c00: 0
> In: serial
> Out: serial
> Err: serial
> usr button is at LOW LEVEL
> Net:
> Warning: ethernet@40028000 (eth0) using random MAC address -
> fe:f8:94:5f:5e:26
> eth0: ethernet@40028000
> Hit SPACE in 3 seconds to stop autoboot.
> Wrong Image Format for bootm command
> ERROR: can't get kernel image!
> U-Boot >
>
> Seems like a regression to me.
>
> best regards
> Waldemar
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: u-boot 2022-07 on STM32F746G-DISCO
2022-09-19 11:48 ` Waldemar Brodkorb
2022-09-19 14:33 ` Patrice CHOTARD
2022-09-19 14:35 ` Patrice CHOTARD
@ 2022-09-19 14:36 ` Patrice CHOTARD
2022-09-19 14:43 ` Patrice CHOTARD
2022-09-19 21:09 ` Simon Glass
3 siblings, 1 reply; 14+ messages in thread
From: Patrice CHOTARD @ 2022-09-19 14:36 UTC (permalink / raw)
To: Waldemar Brodkorb; +Cc: U-Boot Mailing List
Hi Waldemar
On 9/19/22 13:48, Waldemar Brodkorb wrote:
> Hi again,
>
> Waldemar Brodkorb wrote,
>
>> Hi,
>>
>> I am trying to run u-boot on a STM32F746G-DISCO device.
>> I am configuring u-boot with stm32f746-disco_spl_defconfig.
>>
>> But nothing happens on the LCD nor on the serial console.
>> I use screen /dev/ttyACM0 115200 under Linux to connect.
>
> It seems my USB port on my laptop was buggy, after reboot I get
> following output via serial console:
>
> U-Boot SPL 2022.07 (Sep 19 2022 - 13:20:08 +0200)
> Trying to boot from XIP
>
>
> U-Boot 2022.07 (Sep 19 2022 - 13:20:08 +0200)
>
> Model: STMicroelectronics STM32F746-DISCO board
> DRAM: 8 MiB
> Hard fault
> pc : 080087d6 lr : c05aa775 xPSR : a1000000
> r12 : 00000010 r3 : 080087c1 r2 : 0805344d
> r1 : 08008001 r0 : c05aa000
> Resetting CPU ...
>
> resetting ...
>
> I get a Hard fault. I then tried an older version of u-boot using
> the information from https://github.com/fdu/STM32F746G-disco_Buildroot
> as a hint. With U-Boot 2018.11 I get a working binary (I had to
> disable Falcon mode):
>
> U-Boot SPL 2018.11 (Sep 19 2022 - 13:41:50 +0200)
> Trying to boot from XIP
>
>
> U-Boot 2018.11 (Sep 19 2022 - 13:41:50 +0200)
>
> Model: STMicroelectronics STM32F746-DISCO board
> DRAM: 8 MiB
> Flash: 1 MiB
> MMC: sdio@40012c00: 0
> In: serial
> Out: serial
> Err: serial
> usr button is at LOW LEVEL
> Net:
> Warning: ethernet@40028000 (eth0) using random MAC address -
> fe:f8:94:5f:5e:26
> eth0: ethernet@40028000
> Hit SPACE in 3 seconds to stop autoboot.
> Wrong Image Format for bootm command
> ERROR: can't get kernel image!
> U-Boot >
>
> Seems like a regression to me.
>
> best regards
> Waldemar
There are several issues with SPL with STM32F7 based boards.
I am currently working on it.
A series will be submitted very soon
Patrice
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: u-boot 2022-07 on STM32F746G-DISCO
2022-09-19 14:36 ` Patrice CHOTARD
@ 2022-09-19 14:43 ` Patrice CHOTARD
2022-09-19 21:03 ` Waldemar Brodkorb
0 siblings, 1 reply; 14+ messages in thread
From: Patrice CHOTARD @ 2022-09-19 14:43 UTC (permalink / raw)
To: Waldemar Brodkorb; +Cc: U-Boot Mailing List
Waldemar,
You can applied the following series on current U-Boot master
branch (a0759684e015bd7252be3af508c0fcfdbb8ec5dc):
https://patchwork.ozlabs.org/project/uboot/list/?series=318991
Thanks
Patrice
On 9/19/22 16:36, Patrice CHOTARD wrote:
> Hi Waldemar
>
> On 9/19/22 13:48, Waldemar Brodkorb wrote:
>> Hi again,
>>
>> Waldemar Brodkorb wrote,
>>
>>> Hi,
>>>
>>> I am trying to run u-boot on a STM32F746G-DISCO device.
>>> I am configuring u-boot with stm32f746-disco_spl_defconfig.
>>>
>>> But nothing happens on the LCD nor on the serial console.
>>> I use screen /dev/ttyACM0 115200 under Linux to connect.
>>
>> It seems my USB port on my laptop was buggy, after reboot I get
>> following output via serial console:
>>
>> U-Boot SPL 2022.07 (Sep 19 2022 - 13:20:08 +0200)
>> Trying to boot from XIP
>>
>>
>> U-Boot 2022.07 (Sep 19 2022 - 13:20:08 +0200)
>>
>> Model: STMicroelectronics STM32F746-DISCO board
>> DRAM: 8 MiB
>> Hard fault
>> pc : 080087d6 lr : c05aa775 xPSR : a1000000
>> r12 : 00000010 r3 : 080087c1 r2 : 0805344d
>> r1 : 08008001 r0 : c05aa000
>> Resetting CPU ...
>>
>> resetting ...
>>
>> I get a Hard fault. I then tried an older version of u-boot using
>> the information from https://github.com/fdu/STM32F746G-disco_Buildroot
>> as a hint. With U-Boot 2018.11 I get a working binary (I had to
>> disable Falcon mode):
>>
>> U-Boot SPL 2018.11 (Sep 19 2022 - 13:41:50 +0200)
>> Trying to boot from XIP
>>
>>
>> U-Boot 2018.11 (Sep 19 2022 - 13:41:50 +0200)
>>
>> Model: STMicroelectronics STM32F746-DISCO board
>> DRAM: 8 MiB
>> Flash: 1 MiB
>> MMC: sdio@40012c00: 0
>> In: serial
>> Out: serial
>> Err: serial
>> usr button is at LOW LEVEL
>> Net:
>> Warning: ethernet@40028000 (eth0) using random MAC address -
>> fe:f8:94:5f:5e:26
>> eth0: ethernet@40028000
>> Hit SPACE in 3 seconds to stop autoboot.
>> Wrong Image Format for bootm command
>> ERROR: can't get kernel image!
>> U-Boot >
>>
>> Seems like a regression to me.
>>
>> best regards
>> Waldemar
>
> There are several issues with SPL with STM32F7 based boards.
> I am currently working on it.
> A series will be submitted very soon
>
> Patrice
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: u-boot 2022-07 on STM32F746G-DISCO
2022-09-19 14:43 ` Patrice CHOTARD
@ 2022-09-19 21:03 ` Waldemar Brodkorb
2022-09-20 8:47 ` Patrice CHOTARD
0 siblings, 1 reply; 14+ messages in thread
From: Waldemar Brodkorb @ 2022-09-19 21:03 UTC (permalink / raw)
To: Patrice CHOTARD; +Cc: Waldemar Brodkorb, U-Boot Mailing List
Hi Patrice,
Patrice CHOTARD wrote,
> Waldemar,
>
> You can applied the following series on current U-Boot master
> branch (a0759684e015bd7252be3af508c0fcfdbb8ec5dc):
>
> https://patchwork.ozlabs.org/project/uboot/list/?series=318991
>
I applied the patches on top of u-boot master and the non-SPL
build still works fine. It seems only 2022.07 is broken, master is fine.
The SPL build compiles, but I get no output via serial console after
flashing. I changed the openocd command to use 0x8009000 for u-boot.
/home/wbx/openadk/host_x86_64-linux-gnu/usr/bin/openocd \
-f interface/stlink.cfg -f board/stm32f7discovery.cfg \
-c "init" \
-c "reset init" \
-c "flash probe 0" \
-c "flash info 0" \
-c "flash write_image erase spl/u-boot-spl.bin 0x08000000" \
-c "flash write_image erase u-boot-dtb.bin 0x08009000" \
-c "reset run" \
-c "shutdown"
Is this change correct or do I misread your patches?
BTW: Do you have a working Linux configuration file you can share
with me? Which Linux version do you use on the device?
best regards
Waldemar
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: u-boot 2022-07 on STM32F746G-DISCO
2022-09-19 11:48 ` Waldemar Brodkorb
` (2 preceding siblings ...)
2022-09-19 14:36 ` Patrice CHOTARD
@ 2022-09-19 21:09 ` Simon Glass
2022-09-19 23:12 ` Waldemar Brodkorb
3 siblings, 1 reply; 14+ messages in thread
From: Simon Glass @ 2022-09-19 21:09 UTC (permalink / raw)
To: Waldemar Brodkorb; +Cc: U-Boot Mailing List
Hi Waldemar,
On Mon, 19 Sept 2022 at 13:48, Waldemar Brodkorb <wbx@openadk.org> wrote:
>
> Hi again,
>
> Waldemar Brodkorb wrote,
>
> > Hi,
> >
> > I am trying to run u-boot on a STM32F746G-DISCO device.
> > I am configuring u-boot with stm32f746-disco_spl_defconfig.
> >
> > But nothing happens on the LCD nor on the serial console.
> > I use screen /dev/ttyACM0 115200 under Linux to connect.
>
> It seems my USB port on my laptop was buggy, after reboot I get
> following output via serial console:
>
> U-Boot SPL 2022.07 (Sep 19 2022 - 13:20:08 +0200)
> Trying to boot from XIP
>
>
> U-Boot 2022.07 (Sep 19 2022 - 13:20:08 +0200)
>
> Model: STMicroelectronics STM32F746-DISCO board
> DRAM: 8 MiB
> Hard fault
> pc : 080087d6 lr : c05aa775 xPSR : a1000000
> r12 : 00000010 r3 : 080087c1 r2 : 0805344d
> r1 : 08008001 r0 : c05aa000
> Resetting CPU ...
>
> resetting ...
>
> I get a Hard fault. I then tried an older version of u-boot using
> the information from https://github.com/fdu/STM32F746G-disco_Buildroot
> as a hint. With U-Boot 2018.11 I get a working binary (I had to
> disable Falcon mode):
>
> U-Boot SPL 2018.11 (Sep 19 2022 - 13:41:50 +0200)
> Trying to boot from XIP
>
>
> U-Boot 2018.11 (Sep 19 2022 - 13:41:50 +0200)
>
> Model: STMicroelectronics STM32F746-DISCO board
> DRAM: 8 MiB
> Flash: 1 MiB
> MMC: sdio@40012c00: 0
> In: serial
> Out: serial
> Err: serial
> usr button is at LOW LEVEL
> Net:
> Warning: ethernet@40028000 (eth0) using random MAC address -
> fe:f8:94:5f:5e:26
> eth0: ethernet@40028000
> Hit SPACE in 3 seconds to stop autoboot.
> Wrong Image Format for bootm command
> ERROR: can't get kernel image!
> U-Boot >
>
> Seems like a regression to me.
Yes, can you use git bisect to find it?
Regards,
Simon
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: u-boot 2022-07 on STM32F746G-DISCO
2022-09-19 21:09 ` Simon Glass
@ 2022-09-19 23:12 ` Waldemar Brodkorb
2022-09-20 9:03 ` Patrice CHOTARD
0 siblings, 1 reply; 14+ messages in thread
From: Waldemar Brodkorb @ 2022-09-19 23:12 UTC (permalink / raw)
To: Simon Glass; +Cc: Waldemar Brodkorb, U-Boot Mailing List, Chia-Wei Wang
Hi Simon,
Simon Glass wrote,
> Hi Waldemar,
>
> On Mon, 19 Sept 2022 at 13:48, Waldemar Brodkorb <wbx@openadk.org> wrote:
> >
> > Hi again,
> >
> > Waldemar Brodkorb wrote,
> >
> > > Hi,
> > >
> > > I am trying to run u-boot on a STM32F746G-DISCO device.
> > > I am configuring u-boot with stm32f746-disco_spl_defconfig.
> > >
> > > But nothing happens on the LCD nor on the serial console.
> > > I use screen /dev/ttyACM0 115200 under Linux to connect.
> >
> > It seems my USB port on my laptop was buggy, after reboot I get
> > following output via serial console:
> >
> > U-Boot SPL 2022.07 (Sep 19 2022 - 13:20:08 +0200)
> > Trying to boot from XIP
> >
> >
> > U-Boot 2022.07 (Sep 19 2022 - 13:20:08 +0200)
> >
> > Model: STMicroelectronics STM32F746-DISCO board
> > DRAM: 8 MiB
> > Hard fault
> > pc : 080087d6 lr : c05aa775 xPSR : a1000000
> > r12 : 00000010 r3 : 080087c1 r2 : 0805344d
> > r1 : 08008001 r0 : c05aa000
> > Resetting CPU ...
> >
> > resetting ...
> >
> > I get a Hard fault. I then tried an older version of u-boot using
> > the information from https://github.com/fdu/STM32F746G-disco_Buildroot
> > as a hint. With U-Boot 2018.11 I get a working binary (I had to
> > disable Falcon mode):
> >
> > U-Boot SPL 2018.11 (Sep 19 2022 - 13:41:50 +0200)
> > Trying to boot from XIP
> >
> >
> > U-Boot 2018.11 (Sep 19 2022 - 13:41:50 +0200)
> >
> > Model: STMicroelectronics STM32F746-DISCO board
> > DRAM: 8 MiB
> > Flash: 1 MiB
> > MMC: sdio@40012c00: 0
> > In: serial
> > Out: serial
> > Err: serial
> > usr button is at LOW LEVEL
> > Net:
> > Warning: ethernet@40028000 (eth0) using random MAC address -
> > fe:f8:94:5f:5e:26
> > eth0: ethernet@40028000
> > Hit SPACE in 3 seconds to stop autoboot.
> > Wrong Image Format for bootm command
> > ERROR: can't get kernel image!
> > U-Boot >
> >
> > Seems like a regression to me.
>
> Yes, can you use git bisect to find it?
cd82f199852d88218e1f17f5ec07cdd9112a89c4 is the first bad commit.
When I revert this commit on master I get:
U-Boot SPL 2022.10-rc5-00001-gdbcc7add19-dirty (Sep 20 2022 -
00:59:21 +0200)
Trying to boot from XIP
U-Boot 2022.10-rc5-00001-gdbcc7add19-dirty (Sep 20 2022 - 00:59:21
+0200)
Model: STMicroelectronics STM32F746-DISCO board
DRAM: 8 MiB
stm32fx_rcc_clock rcc@40023800: set_rate not implemented for clock
index 4
stm32fx_rcc_clock rcc@40023800: set_rate not implemented for clock
index 4
stm32fx_rcc_clock rcc@40023800: set_rate not implemented for clock
index 4
Core: 38 devices, 22 uclasses, devicetree: separate
Flash: 1 MiB
MMC: sdio1@40012c00: 0
Loading Environment from nowhere... OK
In: serial
Out: serial
Err: serial
usr button is at LOW LEVEL
Net:
Warning: ethernet@40028000 (eth0) using random MAC address -
7e:cf:cf:fc:30:4a
eth0: ethernet@40028000
Hit SPACE in 3 seconds to stop autoboot.
MMC: no card present
looks good without the problematic commit.
best regards
Waldemar
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: u-boot 2022-07 on STM32F746G-DISCO
2022-09-19 21:03 ` Waldemar Brodkorb
@ 2022-09-20 8:47 ` Patrice CHOTARD
2022-09-20 10:53 ` Waldemar Brodkorb
0 siblings, 1 reply; 14+ messages in thread
From: Patrice CHOTARD @ 2022-09-20 8:47 UTC (permalink / raw)
To: Waldemar Brodkorb; +Cc: U-Boot Mailing List
[-- Attachment #1: Type: text/plain, Size: 2108 bytes --]
Hi Waldemar
On 9/19/22 23:03, Waldemar Brodkorb wrote:
> Hi Patrice,
> Patrice CHOTARD wrote,
>
>> Waldemar,
>>
>> You can applied the following series on current U-Boot master
>> branch (a0759684e015bd7252be3af508c0fcfdbb8ec5dc):
>>
>> https://patchwork.ozlabs.org/project/uboot/list/?series=318991
>>
>
> I applied the patches on top of u-boot master and the non-SPL
> build still works fine. It seems only 2022.07 is broken, master is fine.
>
> The SPL build compiles, but I get no output via serial console after
> flashing. I changed the openocd command to use 0x8009000 for u-boot.
>
> /home/wbx/openadk/host_x86_64-linux-gnu/usr/bin/openocd \
> -f interface/stlink.cfg -f board/stm32f7discovery.cfg \
> -c "init" \
> -c "reset init" \
> -c "flash probe 0" \
> -c "flash info 0" \
> -c "flash write_image erase spl/u-boot-spl.bin 0x08000000" \
> -c "flash write_image erase u-boot-dtb.bin 0x08009000" \
> -c "reset run" \
> -c "shutdown"
>
> Is this change correct or do I misread your patches?
Due to the flash layout (the 4 first sectors size is 32KB) using
"flash write_image erase" command, as you did, can't be used anymore due
to the SPL size increase.
SPL size is over 32KB (0x8000), so SPL binary occupies the first and a part
of the second 32KB sectors.
When you execute "flash write_image erase u-boot-dtb.bin 0x08009000",
this command erase the second 32KB sector (where a part of SPL has been
previously copied) before copying the u-boot-dtb.bin binary.
So i advice you to use the method described in doc/board/st/stm32_MCU.rst
Copy directly the generated binary u-boot-with-spl.bin into the mass-storage
exposed by the board.
Example, under Ubuntu you should see the following directory /media/$USER/DIS_F746NG
>
> BTW: Do you have a working Linux configuration file you can share
> with me? Which Linux version do you use on the device?
Yes, i have tested the kernel v6.0-rc4 on STM32F746-disco board recently.
Before you have to apply the attached patch.
Patrice
>
> best regards
> Waldemar
[-- Attachment #2: patch1.patch --]
[-- Type: text/x-patch, Size: 633 bytes --]
diff --git a/arch/arm/configs/stm32_defconfig b/arch/arm/configs/stm32_defconfig
index 1f5446cda8b6..e1f86bd1eed4 100644
--- a/arch/arm/configs/stm32_defconfig
+++ b/arch/arm/configs/stm32_defconfig
@@ -17,12 +17,10 @@ CONFIG_EMBEDDED=y
CONFIG_ARCH_STM32=y
CONFIG_CPU_V7M_NUM_IRQ=240
CONFIG_SET_MEM_PARAM=y
-CONFIG_DRAM_BASE=0x90000000
-CONFIG_FLASH_MEM_BASE=0x08000000
+CONFIG_DRAM_BASE=0xC0000000
+CONFIG_DRAM_SIZE=0x01000000
CONFIG_FLASH_SIZE=0x00200000
# CONFIG_ATAGS is not set
-CONFIG_XIP_KERNEL=y
-CONFIG_XIP_PHYS_ADDR=0x08008000
CONFIG_BINFMT_FLAT=y
# CONFIG_COREDUMP is not set
# CONFIG_VM_EVENT_COUNTERS is not set
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: u-boot 2022-07 on STM32F746G-DISCO
2022-09-19 23:12 ` Waldemar Brodkorb
@ 2022-09-20 9:03 ` Patrice CHOTARD
2022-09-20 11:02 ` Waldemar Brodkorb
0 siblings, 1 reply; 14+ messages in thread
From: Patrice CHOTARD @ 2022-09-20 9:03 UTC (permalink / raw)
To: Waldemar Brodkorb, Simon Glass; +Cc: U-Boot Mailing List, Chia-Wei Wang
Hi Waldemar
On 9/20/22 01:12, Waldemar Brodkorb wrote:
> Hi Simon,
> Simon Glass wrote,
>
>> Hi Waldemar,
>>
>> On Mon, 19 Sept 2022 at 13:48, Waldemar Brodkorb <wbx@openadk.org> wrote:
>>>
>>> Hi again,
>>>
>>> Waldemar Brodkorb wrote,
>>>
>>>> Hi,
>>>>
>>>> I am trying to run u-boot on a STM32F746G-DISCO device.
>>>> I am configuring u-boot with stm32f746-disco_spl_defconfig.
>>>>
>>>> But nothing happens on the LCD nor on the serial console.
>>>> I use screen /dev/ttyACM0 115200 under Linux to connect.
>>>
>>> It seems my USB port on my laptop was buggy, after reboot I get
>>> following output via serial console:
>>>
>>> U-Boot SPL 2022.07 (Sep 19 2022 - 13:20:08 +0200)
>>> Trying to boot from XIP
>>>
>>>
>>> U-Boot 2022.07 (Sep 19 2022 - 13:20:08 +0200)
>>>
>>> Model: STMicroelectronics STM32F746-DISCO board
>>> DRAM: 8 MiB
>>> Hard fault
>>> pc : 080087d6 lr : c05aa775 xPSR : a1000000
>>> r12 : 00000010 r3 : 080087c1 r2 : 0805344d
>>> r1 : 08008001 r0 : c05aa000
>>> Resetting CPU ...
>>>
>>> resetting ...
>>>
>>> I get a Hard fault. I then tried an older version of u-boot using
>>> the information from https://github.com/fdu/STM32F746G-disco_Buildroot
>>> as a hint. With U-Boot 2018.11 I get a working binary (I had to
>>> disable Falcon mode):
>>>
>>> U-Boot SPL 2018.11 (Sep 19 2022 - 13:41:50 +0200)
>>> Trying to boot from XIP
>>>
>>>
>>> U-Boot 2018.11 (Sep 19 2022 - 13:41:50 +0200)
>>>
>>> Model: STMicroelectronics STM32F746-DISCO board
>>> DRAM: 8 MiB
>>> Flash: 1 MiB
>>> MMC: sdio@40012c00: 0
>>> In: serial
>>> Out: serial
>>> Err: serial
>>> usr button is at LOW LEVEL
>>> Net:
>>> Warning: ethernet@40028000 (eth0) using random MAC address -
>>> fe:f8:94:5f:5e:26
>>> eth0: ethernet@40028000
>>> Hit SPACE in 3 seconds to stop autoboot.
>>> Wrong Image Format for bootm command
>>> ERROR: can't get kernel image!
>>> U-Boot >
>>>
>>> Seems like a regression to me.
>>
>> Yes, can you use git bisect to find it?
>
> cd82f199852d88218e1f17f5ec07cdd9112a89c4 is the first bad commit.
I remember i encountered an issue with patch in the past and by updating my toolchain
everything goes fine.
Which toolchain version do you use ?
On my side i am using this one :
https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/11.1.0/x86_64-gcc-11.1.0-nolibc-arm-linux-gnueabi.tar.xz
Patrice
>
> When I revert this commit on master I get:
> U-Boot SPL 2022.10-rc5-00001-gdbcc7add19-dirty (Sep 20 2022 -
> 00:59:21 +0200)
> Trying to boot from XIP
>
>
> U-Boot 2022.10-rc5-00001-gdbcc7add19-dirty (Sep 20 2022 - 00:59:21
> +0200)
>
> Model: STMicroelectronics STM32F746-DISCO board
> DRAM: 8 MiB
> stm32fx_rcc_clock rcc@40023800: set_rate not implemented for clock
> index 4
> stm32fx_rcc_clock rcc@40023800: set_rate not implemented for clock
> index 4
> stm32fx_rcc_clock rcc@40023800: set_rate not implemented for clock
> index 4
> Core: 38 devices, 22 uclasses, devicetree: separate
> Flash: 1 MiB
> MMC: sdio1@40012c00: 0
> Loading Environment from nowhere... OK
> In: serial
> Out: serial
> Err: serial
> usr button is at LOW LEVEL
> Net:
> Warning: ethernet@40028000 (eth0) using random MAC address -
> 7e:cf:cf:fc:30:4a
> eth0: ethernet@40028000
> Hit SPACE in 3 seconds to stop autoboot.
> MMC: no card present
>
> looks good without the problematic commit.
>
> best regards
> Waldemar
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: u-boot 2022-07 on STM32F746G-DISCO
2022-09-20 8:47 ` Patrice CHOTARD
@ 2022-09-20 10:53 ` Waldemar Brodkorb
2022-09-20 12:44 ` Patrice CHOTARD
0 siblings, 1 reply; 14+ messages in thread
From: Waldemar Brodkorb @ 2022-09-20 10:53 UTC (permalink / raw)
To: Patrice CHOTARD; +Cc: Waldemar Brodkorb, U-Boot Mailing List
Hi Patrice,
Patrice CHOTARD wrote,
> Hi Waldemar
>
> On 9/19/22 23:03, Waldemar Brodkorb wrote:
> > Hi Patrice,
> > Patrice CHOTARD wrote,
> >
> >> Waldemar,
> >>
> >> You can applied the following series on current U-Boot master
> >> branch (a0759684e015bd7252be3af508c0fcfdbb8ec5dc):
> >>
> >> https://patchwork.ozlabs.org/project/uboot/list/?series=318991
> >>
> >
> > I applied the patches on top of u-boot master and the non-SPL
> > build still works fine. It seems only 2022.07 is broken, master is fine.
> >
> > The SPL build compiles, but I get no output via serial console after
> > flashing. I changed the openocd command to use 0x8009000 for u-boot.
> >
> > /home/wbx/openadk/host_x86_64-linux-gnu/usr/bin/openocd \
> > -f interface/stlink.cfg -f board/stm32f7discovery.cfg \
> > -c "init" \
> > -c "reset init" \
> > -c "flash probe 0" \
> > -c "flash info 0" \
> > -c "flash write_image erase spl/u-boot-spl.bin 0x08000000" \
> > -c "flash write_image erase u-boot-dtb.bin 0x08009000" \
> > -c "reset run" \
> > -c "shutdown"
> >
> > Is this change correct or do I misread your patches?
>
> Due to the flash layout (the 4 first sectors size is 32KB) using
> "flash write_image erase" command, as you did, can't be used anymore due
> to the SPL size increase.
>
> SPL size is over 32KB (0x8000), so SPL binary occupies the first and a part
> of the second 32KB sectors.
>
> When you execute "flash write_image erase u-boot-dtb.bin 0x08009000",
> this command erase the second 32KB sector (where a part of SPL has been
> previously copied) before copying the u-boot-dtb.bin binary.
>
> So i advice you to use the method described in doc/board/st/stm32_MCU.rst
> Copy directly the generated binary u-boot-with-spl.bin into the mass-storage
> exposed by the board.
>
> Example, under Ubuntu you should see the following directory /media/$USER/DIS_F746NG
When I copy u-boot-with-spl.bin to the mass-storage device I get
following output on the serial console:
U-Boot SPL 2022.10-rc5-00009-g41530b5b3e (Sep 20 2022 - 12:37:40
+0200)
Trying to boot from XIP
fdt_root: FDT_ERR_BADMAGIC
Hard fault
pc : 08009000 lr : 0800070b xPSR : 41000000
r12 : 2004f108 r3 : 40011000 r2 : 080c0000
r1 : ffffffff r0 : 00000000
Resetting CPU ...
resetting ...
How is it supposed to work to start the full u-boot-dtb.bin and
u-boot-with-spl.bin? When I copy both files I get no output, it
seems this is not supported, right?
Maybe I should stick with the normal non-SPL boot, I see no
advantage to have the SPL boot. What is the advantage of the SPL
build?
best regards
Waldemar
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: u-boot 2022-07 on STM32F746G-DISCO
2022-09-20 9:03 ` Patrice CHOTARD
@ 2022-09-20 11:02 ` Waldemar Brodkorb
0 siblings, 0 replies; 14+ messages in thread
From: Waldemar Brodkorb @ 2022-09-20 11:02 UTC (permalink / raw)
To: Patrice CHOTARD
Cc: Waldemar Brodkorb, Simon Glass, U-Boot Mailing List, Chia-Wei Wang
Hi Patrice, Hi Simon,
Patrice CHOTARD wrote,
> Hi Waldemar
>
> On 9/20/22 01:12, Waldemar Brodkorb wrote:
> > Hi Simon,
> > Simon Glass wrote,
> >
> >> Hi Waldemar,
> >>
> >> On Mon, 19 Sept 2022 at 13:48, Waldemar Brodkorb <wbx@openadk.org> wrote:
> >>>
> >>> Hi again,
> >>>
> >>> Waldemar Brodkorb wrote,
> >>>
> >>>> Hi,
> >>>>
> >>>> I am trying to run u-boot on a STM32F746G-DISCO device.
> >>>> I am configuring u-boot with stm32f746-disco_spl_defconfig.
> >>>>
> >>>> But nothing happens on the LCD nor on the serial console.
> >>>> I use screen /dev/ttyACM0 115200 under Linux to connect.
> >>>
> >>> It seems my USB port on my laptop was buggy, after reboot I get
> >>> following output via serial console:
> >>>
> >>> U-Boot SPL 2022.07 (Sep 19 2022 - 13:20:08 +0200)
> >>> Trying to boot from XIP
> >>>
> >>>
> >>> U-Boot 2022.07 (Sep 19 2022 - 13:20:08 +0200)
> >>>
> >>> Model: STMicroelectronics STM32F746-DISCO board
> >>> DRAM: 8 MiB
> >>> Hard fault
> >>> pc : 080087d6 lr : c05aa775 xPSR : a1000000
> >>> r12 : 00000010 r3 : 080087c1 r2 : 0805344d
> >>> r1 : 08008001 r0 : c05aa000
> >>> Resetting CPU ...
> >>>
> >>> resetting ...
> >>>
> >>> I get a Hard fault. I then tried an older version of u-boot using
> >>> the information from https://github.com/fdu/STM32F746G-disco_Buildroot
> >>> as a hint. With U-Boot 2018.11 I get a working binary (I had to
> >>> disable Falcon mode):
> >>>
> >>> U-Boot SPL 2018.11 (Sep 19 2022 - 13:41:50 +0200)
> >>> Trying to boot from XIP
> >>>
> >>>
> >>> U-Boot 2018.11 (Sep 19 2022 - 13:41:50 +0200)
> >>>
> >>> Model: STMicroelectronics STM32F746-DISCO board
> >>> DRAM: 8 MiB
> >>> Flash: 1 MiB
> >>> MMC: sdio@40012c00: 0
> >>> In: serial
> >>> Out: serial
> >>> Err: serial
> >>> usr button is at LOW LEVEL
> >>> Net:
> >>> Warning: ethernet@40028000 (eth0) using random MAC address -
> >>> fe:f8:94:5f:5e:26
> >>> eth0: ethernet@40028000
> >>> Hit SPACE in 3 seconds to stop autoboot.
> >>> Wrong Image Format for bootm command
> >>> ERROR: can't get kernel image!
> >>> U-Boot >
> >>>
> >>> Seems like a regression to me.
> >>
> >> Yes, can you use git bisect to find it?
> >
> > cd82f199852d88218e1f17f5ec07cdd9112a89c4 is the first bad commit.
>
> I remember i encountered an issue with patch in the past and by updating my toolchain > everything goes fine.
>
> Which toolchain version do you use ?
I used arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi.tar.xz from
ARM.
https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
> On my side i am using this one :
> https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/11.1.0/x86_64-gcc-11.1.0-nolibc-arm-linux-gnueabi.tar.xz
Well it really seems to be an toolchain issue, with this one I can
compile U-Boot master and it runs on the system without failure.
best regards
Waldemar
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: u-boot 2022-07 on STM32F746G-DISCO
2022-09-20 10:53 ` Waldemar Brodkorb
@ 2022-09-20 12:44 ` Patrice CHOTARD
0 siblings, 0 replies; 14+ messages in thread
From: Patrice CHOTARD @ 2022-09-20 12:44 UTC (permalink / raw)
To: Waldemar Brodkorb; +Cc: U-Boot Mailing List
Hi Waldemar
On 9/20/22 12:53, Waldemar Brodkorb wrote:
> Hi Patrice,
> Patrice CHOTARD wrote,
>
>> Hi Waldemar
>>
>> On 9/19/22 23:03, Waldemar Brodkorb wrote:
>>> Hi Patrice,
>>> Patrice CHOTARD wrote,
>>>
>>>> Waldemar,
>>>>
>>>> You can applied the following series on current U-Boot master
>>>> branch (a0759684e015bd7252be3af508c0fcfdbb8ec5dc):
>>>>
>>>> https://patchwork.ozlabs.org/project/uboot/list/?series=318991
>>>>
>>>
>>> I applied the patches on top of u-boot master and the non-SPL
>>> build still works fine. It seems only 2022.07 is broken, master is fine.
>>>
>>> The SPL build compiles, but I get no output via serial console after
>>> flashing. I changed the openocd command to use 0x8009000 for u-boot.
>>>
>>> /home/wbx/openadk/host_x86_64-linux-gnu/usr/bin/openocd \
>>> -f interface/stlink.cfg -f board/stm32f7discovery.cfg \
>>> -c "init" \
>>> -c "reset init" \
>>> -c "flash probe 0" \
>>> -c "flash info 0" \
>>> -c "flash write_image erase spl/u-boot-spl.bin 0x08000000" \
>>> -c "flash write_image erase u-boot-dtb.bin 0x08009000" \
>>> -c "reset run" \
>>> -c "shutdown"
>>>
>>> Is this change correct or do I misread your patches?
>>
>> Due to the flash layout (the 4 first sectors size is 32KB) using
>> "flash write_image erase" command, as you did, can't be used anymore due
>> to the SPL size increase.
>>
>> SPL size is over 32KB (0x8000), so SPL binary occupies the first and a part
>> of the second 32KB sectors.
>>
>> When you execute "flash write_image erase u-boot-dtb.bin 0x08009000",
>> this command erase the second 32KB sector (where a part of SPL has been
>> previously copied) before copying the u-boot-dtb.bin binary.
>>
>> So i advice you to use the method described in doc/board/st/stm32_MCU.rst
>> Copy directly the generated binary u-boot-with-spl.bin into the mass-storage
>> exposed by the board.
>>
>> Example, under Ubuntu you should see the following directory /media/$USER/DIS_F746NG
>
> When I copy u-boot-with-spl.bin to the mass-storage device I get
> following output on the serial console:
> U-Boot SPL 2022.10-rc5-00009-g41530b5b3e (Sep 20 2022 - 12:37:40
> +0200)
> Trying to boot from XIP
> fdt_root: FDT_ERR_BADMAGIC
> Hard fault
> pc : 08009000 lr : 0800070b xPSR : 41000000
> r12 : 2004f108 r3 : 40011000 r2 : 080c0000
> r1 : ffffffff r0 : 00000000
> Resetting CPU ...
>
> resetting ...
>
> How is it supposed to work to start the full u-boot-dtb.bin and
> u-boot-with-spl.bin? When I copy both files I get no output, it
> seems this is not supported, right?
u-boot-with-spl.bin is the concatenation of 2 binaries:
u-boot-with-spl.bin = u-boot-spl.bin + u-boot.bin
You should only copy u-boot-with-spl.bin in the board mass-storage.
At the end of u-boot-spl.bin binary, some padding is added to make sure
that u-boot.bin will be located at the expected offset, in our case offset
0x9000 (see CONFIG_SPL_PAD_TO 0x9000 in stm32f746-disco-spl_defconfig)
So u-boot-spl.bin is first executed, located at offset 0 (0x08000000),
then jump in u-boot.bin located at offset 0x9000 (0x08009000).
it's weird because everything looks correct in your log, pc is set with
0x08009000 but i can't understand why u-boot.bin is not executed in your
case ....
>
> Maybe I should stick with the normal non-SPL boot, I see no
> advantage to have the SPL boot. What is the advantage of the SPL
> build?
At the very beginning of stm32f746-disco support, Vikas Manocha introduces
SPL mode to use falcon mode (see doc/README.falcon)
With this mode you can jump directly in kernel after U-Boot SPL execution :
U-Boot SPL -> Kernel (previously flashed at offset 0x9000 and configured in XIP)
If during boot, you maintain the "c" key pressed, the SPL flow will be:
U-Boot SPL -> U-Boot (located in flash) -> Kernel (located in SD-card)
Have you try with stm32f746_disco_defconfig ? in this case, you have to copy
u-boot.bin binary in board mass-storage.
Patrice
>
> best regards
> Waldemar
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2022-09-20 12:44 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-19 10:19 u-boot 2022-07 on STM32F746G-DISCO Waldemar Brodkorb
2022-09-19 11:48 ` Waldemar Brodkorb
2022-09-19 14:33 ` Patrice CHOTARD
2022-09-19 14:35 ` Patrice CHOTARD
2022-09-19 14:36 ` Patrice CHOTARD
2022-09-19 14:43 ` Patrice CHOTARD
2022-09-19 21:03 ` Waldemar Brodkorb
2022-09-20 8:47 ` Patrice CHOTARD
2022-09-20 10:53 ` Waldemar Brodkorb
2022-09-20 12:44 ` Patrice CHOTARD
2022-09-19 21:09 ` Simon Glass
2022-09-19 23:12 ` Waldemar Brodkorb
2022-09-20 9:03 ` Patrice CHOTARD
2022-09-20 11:02 ` Waldemar Brodkorb
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.