Project

General

Profile

Actions

Bug #5210

closed

APP=dfu build doesn't fit for BOARD=ngff_cardem

Added by laforge over 2 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
firmware
Target version:
-
Start date:
08/08/2021
Due date:
% Done:

100%

Spec Reference:

Description

When trying to enable automatic build of the DFU loader for BOARD=ngff_cardem via our jenkins slaves in contrib/jenkins.sh, I get the following:

=============== ngff_cardem / dfu START  ==============
sed "s/PRODUCT_STRING/ngff-cardem/" apps/dfu/usb_strings.txt > apps/dfu/usb_strings.txt.patched
cat apps/dfu/usb_strings.txt.patched | usbstring/usbstring > apps/dfu/usb_strings_generated.h
mkdir -p bin
mkdir -p obj/ngff_cardem
[COMPILING libosmocore/source/panic.c]
[COMPILING libosmocore/source/backtrace.c]
[COMPILING libosmocore/source/msgb.c]
[COMPILING libosmocore/source/utils.c]
[COMPILING libosmocore/source/rbtree.c]
[COMPILING libosmocore/source/timer.c]
[COMPILING libosmocore/source/bits.c]
[COMPILING ./atmel_softpack_libraries/libchip_sam3s/source/USBD_HAL.c]
[COMPILING ./atmel_softpack_libraries/libchip_sam3s/source/unique_id.c]
[COMPILING ./atmel_softpack_libraries/libchip_sam3s/source/tc.c]
[COMPILING ./atmel_softpack_libraries/libchip_sam3s/source/pio_it.c]
[COMPILING ./atmel_softpack_libraries/libchip_sam3s/source/pio.c]
[COMPILING ./atmel_softpack_libraries/libchip_sam3s/source/exceptions.c]
[COMPILING ./atmel_softpack_libraries/libchip_sam3s/source/spi.c]
[COMPILING ./atmel_softpack_libraries/libchip_sam3s/source/efc.c]
[COMPILING ./atmel_softpack_libraries/libchip_sam3s/source/pmc.c]
[COMPILING ./atmel_softpack_libraries/libchip_sam3s/source/flashd.c]
[COMPILING ./atmel_softpack_libraries/libchip_sam3s/source/usart.c]
[COMPILING ./atmel_softpack_libraries/libchip_sam3s/source/wdt.c]
[COMPILING ./atmel_softpack_libraries/libchip_sam3s/cmsis/core_cm3.c]
[COMPILING ./atmel_softpack_libraries/usb/common/core/USBDescriptors.c]
[COMPILING ./atmel_softpack_libraries/usb/common/core/USBRequests.c]
[COMPILING ./atmel_softpack_libraries/usb/device/core/USBD.c]
[COMPILING ./atmel_softpack_libraries/usb/device/core/USBDCallbacks.c]
[COMPILING ./atmel_softpack_libraries/usb/device/core/USBDDriver.c]
[COMPILING ./atmel_softpack_libraries/usb/device/core/USBDDriverCallbacks.c]
[COMPILING libcommon/source/string.c]
[COMPILING libcommon/source/stdio.c]
[COMPILING libcommon/source/fputs.c]
[COMPILING libcommon/source/usb_buf.c]
[COMPILING libcommon/source/ringbuffer.c]
[COMPILING libcommon/source/pseudo_talloc.c]
[COMPILING libcommon/source/host_communication.c]
[COMPILING libcommon/source/main_common.c]
[COMPILING libcommon/source/stack_check.c]
[COMPILING libboard/common/source/board_cstartup_gnu.c]
[COMPILING libboard/common/source/board_lowlevel.c]
[COMPILING libboard/common/source/uart_console.c]
[COMPILING libboard/common/source/led.c]
[COMPILING libboard/common/source/boardver_adc.c]
[COMPILING libboard/common/source/manifest.c]
[COMPILING libboard/ngff_cardem/source/sim_switch.c]
[COMPILING libboard/ngff_cardem/source/board_ngff_cardem.c]
libboard/ngff_cardem/source/board_ngff_cardem.c:156:35: warning: 'struct cardem_inst' declared inside parameter list
 void board_set_card_insert(struct cardem_inst *ci, bool card_insert)
                                   ^
libboard/ngff_cardem/source/board_ngff_cardem.c:156:35: warning: its scope is only this definition or declaration, which is probably not what you want
[COMPILING libboard/ngff_cardem/source/wwan_perst.c]
[COMPILING libboard/ngff_cardem/source/card_pres.c]
[COMPILING libboard/ngff_cardem/source/wwan_led.c]
[COMPILING apps/dfu/main.c]
[COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu.c]
[COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu_desc.c]
[COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu_driver.c]
Memory region         Used Size  Region Size  %age Used
             rom:       16584 B        16 KB    101.22%
             ram:       11720 B        48 KB     23.84/usr/lib/gcc/arm-none-eabi/5.4.1/../../../arm-none-eabi/bin/ld: warning: changing start of section .stack by 4 bytes
/usr/lib/gcc/arm-none-eabi/5.4.1/../../../arm-none-eabi/bin/ld: warning: changing start of section .stack by 4 bytes
/usr/lib/gcc/arm-none-eabi/5.4.1/../../../arm-none-eabi/bin/ld: bin/ngff_cardem-dfu-flash.elf section `.text' will not fit in region `rom'
/usr/lib/gcc/arm-none-eabi/5.4.1/../../../arm-none-eabi/bin/ld: warning: changing start of section .stack by 4 bytes
/usr/lib/gcc/arm-none-eabi/5.4.1/../../../arm-none-eabi/bin/ld: warning: changing start of section .stack by 4 bytes
/usr/lib/gcc/arm-none-eabi/5.4.1/../../../arm-none-eabi/bin/ld: warning: changing start of section .stack by 4 bytes
/usr/lib/gcc/arm-none-eabi/5.4.1/../../../arm-none-eabi/bin/ld: region `rom' overflowed by 200 bytes
collect2: error: ld returned 1 exit status
%
Makefile:246: recipe for target 'flash' failed
make: *** [flash] Error 1
Build step 'Execute shell' marked build as failure
[WARNINGS]Skipping publisher since build result is FAILURE
Finished: FAILURE

please investigate and try to shrink accordingly. All other boards fit in the 16k partition.

Actions #1

Updated by Hoernchen over 2 years ago

It does: just reduce TRACE_LEVEL to 0. This has been an issue with the simtrace for a long time now, and as you can see the last reduction of dfu bootloader code is not sufficient a mere year later..

Actions #2

Updated by Hoernchen over 2 years ago

It even fits for me with the default trace level:
Memory region Used Size Region Size age Used
rom: 16256 B 16 KB 99.22

ram: 11712 B 48 KB 23.83%

Actions #3

Updated by laforge over 2 years ago

On Sun, Aug 08, 2021 at 07:43:18PM +0000, Hoernchen [REDMINE] wrote:

It does: just reduce TRACE_LEVEL to 0. This has been an issue with the simtrace for a long time now, and as you can see the last reduction of dfu bootloader code is not sufficient a mere year later..

It fits for all of our automatic builds in jenkins for
BOARD=qmod/simtrace/owhw, otherwise we would have constant build
failures for the simtrace2-master and -gerrit jobs.

If the task is to introduce support for a new board, then that should include enabling
the build of the minimum required targets (dfu-flash, cardem-dfu) for that board in contrib/jenkins.sh.

If a change of TRACE_LEVEL is required for that board, then that should also be done as
part of the task introducing support for that new board.

The high-level goal is to have automatic builds available for the new board, just like
for the old/existing boards.

I've now added the build for BOARD=ngff_cardem APP=cardem to contrib/jenkins.sh,
please take care of a successful, working build for BOARD=ngff_cardem APP=dfu which
subsequently gets pushed to downloads.osmocom.org. Thanks.

Actions #4

Updated by laforge over 2 years ago

Hoernchen wrote:

It even fits for me with the default trace level:
Memory region Used Size Region Size age Used
rom: 16256 B 16 KB 99.22

ram: 11712 B 48 KB 23.83%

that is great for you personally, but our normal customers/users use the builds that we pubhlish on downloads.osmocom.org, and those are generated via the contrib/jenkins.sh in a defined build environment, where it doesn't fit.

Actions #5

Updated by Hoernchen over 2 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)