Build error 12.2.0

2023-07-06 Thread Mark Stevens
So had a play with 12.2 and came across an error when building.

make -j V=2 generates the following expanded output for the error:

grep -v "CONFIG_BASE_DEFCONFIG" 
"/Users/markstevens/GitHub/NuttXAndPicoW/nuttx/.config" > 
"/Users/markstevens/GitHub/NuttXAndPicoW/nuttx/.config.tmp"
echo "Create version.h"
if ! cmp -s "/Users/markstevens/GitHub/NuttXAndPicoW/nuttx/.config.tmp" 
"/Users/markstevens/GitHub/NuttXAndPicoW/nuttx/.config.orig" ; then \
sed -i.bak "/CONFIG_BASE_DEFCONFIG/ { /-dirty/! s/\"$/-dirty\"/ 
}" "/Users/markstevens/GitHub/NuttXAndPicoW/nuttx/.config"; \
else \
sed -i.bak "s/-dirty//g" 
"/Users/markstevens/GitHub/NuttXAndPicoW/nuttx/.config"; \
fi
mkdir -p staging
Create version.h
sed: 1: "/CONFIG_BASE_DEFCONFIG/ ...": bad flag in substitute command: '}'
make: *** [include/nuttx/config.h] Error 1
make: *** Waiting for unfinished jobs….

Steps to reproduce:

git checkout releases/12.2
git clean -dfx
git reset —hard
./tools/configure.sh -l raspberrypi-pico-w:nsh
make menuconfig
— Change one setting, I disabled the hello example application and save the 
settings.
make -j

OS: MacOS

Note that if you don not make a change using menuconfig then the system builds 
OK.

I have tried with the build system configured as Mac and Linux.

Regards,
Mark
__
mark.stev...@wildernesslabs.co




> On 5 Jul 2023, at 08:06, Alin Jerpelea  wrote:
> 
> The Apache NuttX project team is proud to announce
> Apache NuttX 12.2.0 has been released.
> 
> The release artifacts and Release Notes can be found
> at:https://nuttx.apache.org/download/https://nuttx.apache.org/releases/12.2.0/
> 
> Thanks,
> Alin Jerpelea
> on behalf of Apache NuttX PPMC



Re: Build error 12.2.0

2023-07-06 Thread Petro Karashchenko
https://github.com/apache/nuttx/issues/9670

On Thu, Jul 6, 2023, 2:29 PM Mark Stevens 
wrote:

> So had a play with 12.2 and came across an error when building.
>
> make -j V=2 generates the following expanded output for the error:
>
> grep -v "CONFIG_BASE_DEFCONFIG"
> "/Users/markstevens/GitHub/NuttXAndPicoW/nuttx/.config" >
> "/Users/markstevens/GitHub/NuttXAndPicoW/nuttx/.config.tmp"
> echo "Create version.h"
> if ! cmp -s "/Users/markstevens/GitHub/NuttXAndPicoW/nuttx/.config.tmp"
> "/Users/markstevens/GitHub/NuttXAndPicoW/nuttx/.config.orig" ; then \
> sed -i.bak "/CONFIG_BASE_DEFCONFIG/ { /-dirty/!
> s/\"$/-dirty\"/ }" "/Users/markstevens/GitHub/NuttXAndPicoW/nuttx/.config";
> \
> else \
> sed -i.bak "s/-dirty//g"
> "/Users/markstevens/GitHub/NuttXAndPicoW/nuttx/.config"; \
> fi
> mkdir -p staging
> Create version.h
> sed: 1: "/CONFIG_BASE_DEFCONFIG/ ...": bad flag in substitute command: '}'
> make: *** [include/nuttx/config.h] Error 1
> make: *** Waiting for unfinished jobs….
>
> Steps to reproduce:
>
> git checkout releases/12.2
> git clean -dfx
> git reset —hard
> ./tools/configure.sh -l raspberrypi-pico-w:nsh
> make menuconfig
> — Change one setting, I disabled the hello example application and save
> the settings.
> make -j
>
> OS: MacOS
>
> Note that if you don not make a change using menuconfig then the system
> builds OK.
>
> I have tried with the build system configured as Mac and Linux.
>
> Regards,
> Mark
> __
> mark.stev...@wildernesslabs.co
>
>
>
>
> > On 5 Jul 2023, at 08:06, Alin Jerpelea  wrote:
> >
> > The Apache NuttX project team is proud to announce
> > Apache NuttX 12.2.0 has been released.
> >
> > The release artifacts and Release Notes can be found
> > at:
> https://nuttx.apache.org/download/https://nuttx.apache.org/releases/12.2.0/
> >
> > Thanks,
> > Alin Jerpelea
> > on behalf of Apache NuttX PPMC
>
>


Re: Build error 12.2.0

2023-07-06 Thread Alan C. Assis
Hmm, too late, NuttX 12.2.0 as released with that regression.

As workaround people can use Linux and avoid too much power in the
hands of a single company! That company value is U$ 4 Trillion (only 7
countries in the world has GDP bigger than that).

Jokes aside, I thin we need to release 12.2.1 with a fix, what do you
think Alin?

BR,

Alan

On 7/6/23, Petro Karashchenko  wrote:
> https://github.com/apache/nuttx/issues/9670
>
> On Thu, Jul 6, 2023, 2:29 PM Mark Stevens 
> wrote:
>
>> So had a play with 12.2 and came across an error when building.
>>
>> make -j V=2 generates the following expanded output for the error:
>>
>> grep -v "CONFIG_BASE_DEFCONFIG"
>> "/Users/markstevens/GitHub/NuttXAndPicoW/nuttx/.config" >
>> "/Users/markstevens/GitHub/NuttXAndPicoW/nuttx/.config.tmp"
>> echo "Create version.h"
>> if ! cmp -s "/Users/markstevens/GitHub/NuttXAndPicoW/nuttx/.config.tmp"
>> "/Users/markstevens/GitHub/NuttXAndPicoW/nuttx/.config.orig" ; then \
>> sed -i.bak "/CONFIG_BASE_DEFCONFIG/ { /-dirty/!
>> s/\"$/-dirty\"/ }"
>> "/Users/markstevens/GitHub/NuttXAndPicoW/nuttx/.config";
>> \
>> else \
>> sed -i.bak "s/-dirty//g"
>> "/Users/markstevens/GitHub/NuttXAndPicoW/nuttx/.config"; \
>> fi
>> mkdir -p staging
>> Create version.h
>> sed: 1: "/CONFIG_BASE_DEFCONFIG/ ...": bad flag in substitute command:
>> '}'
>> make: *** [include/nuttx/config.h] Error 1
>> make: *** Waiting for unfinished jobs….
>>
>> Steps to reproduce:
>>
>> git checkout releases/12.2
>> git clean -dfx
>> git reset —hard
>> ./tools/configure.sh -l raspberrypi-pico-w:nsh
>> make menuconfig
>> — Change one setting, I disabled the hello example application and save
>> the settings.
>> make -j
>>
>> OS: MacOS
>>
>> Note that if you don not make a change using menuconfig then the system
>> builds OK.
>>
>> I have tried with the build system configured as Mac and Linux.
>>
>> Regards,
>> Mark
>> __
>> mark.stev...@wildernesslabs.co
>>
>>
>>
>>
>> > On 5 Jul 2023, at 08:06, Alin Jerpelea  wrote:
>> >
>> > The Apache NuttX project team is proud to announce
>> > Apache NuttX 12.2.0 has been released.
>> >
>> > The release artifacts and Release Notes can be found
>> > at:
>> https://nuttx.apache.org/download/https://nuttx.apache.org/releases/12.2.0/
>> >
>> > Thanks,
>> > Alin Jerpelea
>> > on behalf of Apache NuttX PPMC
>>
>>
>


Re: Build error 12.2.0

2023-07-06 Thread Alin Jerpelea
we should do 12.2.1 soon
Best regards
Alin

On Thu, 6 Jul 2023, 15:43 Alan C. Assis,  wrote:

> Hmm, too late, NuttX 12.2.0 as released with that regression.
>
> As workaround people can use Linux and avoid too much power in the
> hands of a single company! That company value is U$ 4 Trillion (only 7
> countries in the world has GDP bigger than that).
>
> Jokes aside, I thin we need to release 12.2.1 with a fix, what do you
> think Alin?
>
> BR,
>
> Alan
>
> On 7/6/23, Petro Karashchenko  wrote:
> > https://github.com/apache/nuttx/issues/9670
> >
> > On Thu, Jul 6, 2023, 2:29 PM Mark Stevens <
> mark.stev...@wildernesslabs.co>
> > wrote:
> >
> >> So had a play with 12.2 and came across an error when building.
> >>
> >> make -j V=2 generates the following expanded output for the error:
> >>
> >> grep -v "CONFIG_BASE_DEFCONFIG"
> >> "/Users/markstevens/GitHub/NuttXAndPicoW/nuttx/.config" >
> >> "/Users/markstevens/GitHub/NuttXAndPicoW/nuttx/.config.tmp"
> >> echo "Create version.h"
> >> if ! cmp -s "/Users/markstevens/GitHub/NuttXAndPicoW/nuttx/.config.tmp"
> >> "/Users/markstevens/GitHub/NuttXAndPicoW/nuttx/.config.orig" ; then \
> >> sed -i.bak "/CONFIG_BASE_DEFCONFIG/ { /-dirty/!
> >> s/\"$/-dirty\"/ }"
> >> "/Users/markstevens/GitHub/NuttXAndPicoW/nuttx/.config";
> >> \
> >> else \
> >> sed -i.bak "s/-dirty//g"
> >> "/Users/markstevens/GitHub/NuttXAndPicoW/nuttx/.config"; \
> >> fi
> >> mkdir -p staging
> >> Create version.h
> >> sed: 1: "/CONFIG_BASE_DEFCONFIG/ ...": bad flag in substitute command:
> >> '}'
> >> make: *** [include/nuttx/config.h] Error 1
> >> make: *** Waiting for unfinished jobs….
> >>
> >> Steps to reproduce:
> >>
> >> git checkout releases/12.2
> >> git clean -dfx
> >> git reset —hard
> >> ./tools/configure.sh -l raspberrypi-pico-w:nsh
> >> make menuconfig
> >> — Change one setting, I disabled the hello example application and save
> >> the settings.
> >> make -j
> >>
> >> OS: MacOS
> >>
> >> Note that if you don not make a change using menuconfig then the system
> >> builds OK.
> >>
> >> I have tried with the build system configured as Mac and Linux.
> >>
> >> Regards,
> >> Mark
> >> __
> >> mark.stev...@wildernesslabs.co
> >>
> >>
> >>
> >>
> >> > On 5 Jul 2023, at 08:06, Alin Jerpelea  wrote:
> >> >
> >> > The Apache NuttX project team is proud to announce
> >> > Apache NuttX 12.2.0 has been released.
> >> >
> >> > The release artifacts and Release Notes can be found
> >> > at:
> >>
> https://nuttx.apache.org/download/https://nuttx.apache.org/releases/12.2.0/
> >> >
> >> > Thanks,
> >> > Alin Jerpelea
> >> > on behalf of Apache NuttX PPMC
> >>
> >>
> >
>


Re: App crashes if entrypoint but not from nsh

2023-07-06 Thread Tim Hardisty

Argument is correctly passed and prints as expected.

I just found that for some reason in the new config I created for this 
work that somehow CONFIG_BOARD_LATE_INITIALIZE was not set, so my board 
bringup code was not initialised, so there was no /dev/fb0 for lvgl to use.


Doh!

On 05/07/2023 20:01, Petro Karashchenko wrote:

I'm asking about parameters because if I recall correctly the arguments
were stored on program stack, so I thought of maybe some stack alignment
issue or something similar.
Maybe you can modify lvgldemo_main and place print some message to console
+ sleep(1); in a loop just after it is entered? Not sure if that will give
us much, but worth of trying to get some information.

Best regards,
Petro

On Wed, Jul 5, 2023, 9:30 PM Tim Hardisty  wrote:


Yes (or "music") - so called by
nsh: lvgldemo music

It's a memory-type problem of some sort rather than errors with vars, I
believe.

On 05/07/2023 19:24, Petro Karashchenko wrote:

Just to clarify, when you run lvgldemo from nsh, do you also pass "widgets"
as argument, right?

On Wed, Jul 5, 2023, 8:54 PM Tim Hardisty  wrote:



Sure. I think attachements get stripped out so I have pasted the
contents (I've "xxx"d references to the board name)

#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the
installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file
that includes your
# modifications.
#
# CONFIG_ACT8945A_LDO1_PULLDOWN is not set
# CONFIG_ACT8945A_LDO2_BOOT_ON is not set
# CONFIG_DEV_RANDOM is not set
# CONFIG_DISABLE_OS_API is not set
# CONFIG_FS_ANONMAP is not set
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
# CONFIG_SAMA5_RXLP is not set
# CONFIG_SAMA5_UART0 is not set
# CONFIG_SIG_SIGSTOP_ACTION is not set
CONFIG_ACT8945A_DCDC1_NAME="VDD_IODDR"
CONFIG_ACT8945A_DCDC2_NAME="VDD_CORE"
CONFIG_ACT8945A_DCDC3_NAME="VDD_3V3"
CONFIG_ACT8945A_LDO1_NAME="VDD_FUSE"
CONFIG_ACT8945A_LDO2_NAME="VDD_3V3_LP"
CONFIG_ACT8945A_LDO3_APPLY_UV=y
CONFIG_ACT8945A_LDO3_BOOT_ON=y
CONFIG_ACT8945A_LDO3_MAX_UV=3300
CONFIG_ACT8945A_LDO3_MIN_UV=3300
CONFIG_ACT8945A_LDO3_NAME="VDD_LED"
CONFIG_ACT8945A_LDO4_NAME="VDD_GPS_ANTENNA"
CONFIG_ADC_FIFOSIZE=40
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD_CUSTOM=y
CONFIG_ARCH_BOARD_CUSTOM_DIR="../CustomBoards/x"
CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y
CONFIG_ARCH_BOARD_CUSTOM_NAME="x"
CONFIG_ARCH_CHIP="sama5"
CONFIG_ARCH_CHIP_ATSAMA5D27=y
CONFIG_ARCH_CHIP_SAMA5=y
CONFIG_ARCH_CHIP_SAMA5D2=y
CONFIG_ARCH_INTERRUPTSTACK=2048
CONFIG_ARCH_LOWVECTORS=y
CONFIG_ARM_FPU_ABI_SOFT=y
CONFIG_AT25_SPIFREQUENCY=500
CONFIG_AUDIO=y
CONFIG_BOARDCTL_FINALINIT=y
CONFIG_BOARDCTL_UNIQUEID=y
CONFIG_BOARDCTL_UNIQUEID_SIZE=8
CONFIG_BOARD_LOOPSPERMSEC=65775
CONFIG_BOOT_RUNFROMSDRAM=y
CONFIG_BUILTIN=y
CONFIG_CUSTOM_APPS_AT25TEST=y
CONFIG_CUSTOM_APPS_T2_FILEGEN=y
CONFIG_DEBUG_ERROR=y
CONFIG_DEBUG_FEATURES=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEBUG_TCBINFO=y
CONFIG_DEBUG_WARN=y
CONFIG_DEFAULT_TASK_STACKSIZE=4096
CONFIG_DEV_GPIO=y
CONFIG_DEV_ZERO=y
CONFIG_DRIVERS_AUDIO=y
CONFIG_DRIVERS_VIDEO=y
CONFIG_EE25XX_FREQUENCY=500
CONFIG_EEPROM=y
CONFIG_EXAMPLES_FB=y
CONFIG_EXAMPLES_LVGLDEMO=y
CONFIG_EXAMPLES_LVGLDEMO_STACKSIZE=65535
CONFIG_EXAMPLES_TOUCHSCREEN=y
CONFIG_FS_FAT=y
CONFIG_FS_LITTLEFS=y
CONFIG_FS_PROCFS=y
CONFIG_FS_PROCFS_REGISTER=y
CONFIG_GD25_SPIFREQUENCY=10400
CONFIG_GRAPHICS_LVGL=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_INIT_ARGS="\"widgets\""
CONFIG_INIT_ENTRYNAME="lvgldemo"
CONFIG_INIT_ENTRYPOINT="lvgldemo_main"
CONFIG_INIT_STACKSIZE=65535
CONFIG_LCD=y
CONFIG_LIBC_NUMBERED_ARGS=y
CONFIG_LP503X=y
CONFIG_LV_ATTRIBUTE_FAST_MEM_USE_IRAM=y
CONFIG_LV_COLOR_DEPTH_32=y
CONFIG_LV_COLOR_MIX_ROUND_OFS=128
CONFIG_LV_COLOR_SCREEN_TRANSP=y
CONFIG_LV_DISP_DEF_REFR_PERIOD=50
CONFIG_LV_DPI_DEF=188
CONFIG_LV_FONT_MONTSERRAT_12=y
CONFIG_LV_FONT_MONTSERRAT_16=y
CONFIG_LV_FONT_MONTSERRAT_18=y
CONFIG_LV_FONT_MONTSERRAT_22=y
CONFIG_LV_FONT_MONTSERRAT_24=y
CONFIG_LV_FONT_MONTSERRAT_32=y
CONFIG_LV_MEM_CUSTOM=y
CONFIG_LV_PORT_TOUCHPAD_CURSOR_SIZE=10
CONFIG_LV_PORT_USE_FBDEV=y
CONFIG_LV_PORT_USE_TOUCHPAD=y
CONFIG_LV_TICK_CUSTOM=y
CONFIG_LV_TICK_CUSTOM_INCLUDE="port/lv_port_tick.h"
CONFIG_LV_USE_ASSERT_MEM_INTEGRITY=y
CONFIG_LV_USE_ASSERT_OBJ=y
CONFIG_LV_USE_ASSERT_STYLE=y
CONFIG_LV_USE_DEMO_MUSIC=y
CONFIG_LV_USE_DEMO_WIDGETS=y
CONFIG_LV_USE_PERF_MONITOR=y
CONFIG_M25P_SPIFREQUENCY=9000
CONFIG_MM_BACKTRACE=4
CONFIG_MM_BACKTRACE_DEFAULT=y
CONFIG_MQ_MAXMSGSIZE=64
CONFIG_MTD=y
CONFIG_MTD_AT25=y
CONFIG_MTD_GD25=y
CONFIG_MTD_M25P=y
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_CMDOPT_DD_STATS=y
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_READLINE=y
CONFIG_NXFONTS_DISABLE_16BPP=y
CONFIG_NXFONTS_DISABLE_1BPP=y
CONFIG_NXFONTS_DISABLE_24BPP=y
CONFIG_NXFONTS_DISABLE_2BPP=y
CONFIG_NXFONTS_DISABLE_32BPP=y
CONFIG_NXFONTS_DISABLE_4BPP=y
CONFIG_NXFONTS_DISABLE_8BPP=y
CONFIG_PREALLOC_TIMERS=4
CONFIG_PRIORITY_INHERITANCE=y
CONFIG_PTHREAD_MUTEX_TYPES=y
CONFIG_P

[OT] Getting Started with (Apache) NuttX RTOS Part 2 - Looking Inside and Creating Your Customized Image

2023-07-06 Thread Alan C. Assis
Hi NuttXers,

The second part of the NuttX Getting Started was published:

https://www.embeddedrelated.com/showarticle/1543.php

BR,

Alan


Re: Bootloaders other than u-boot?

2023-07-06 Thread Tim Hardisty
Having got u-boot to work and, now, also got lvgldemo to run 
automatically at startup, I have taken some rough timings of the boot 
time on my sama5d27 board and thought others might be interested.

power->at91bootstrap->uboot (autoboot with 0s timeout)->nuttx->graphics 
on the screen: 6 seconds

If I use the bootstrap program to boot NuttX directly however:

power->at91bootstrap->nuttx->graphics on the screen: 2 seconds

It seems uboot is not really a very good choice as a bootloader for an 
embedded system, where boot time is important (I was looking for <3s).

 From this discussion (thank you everyone) I believe I will be OK using 
USB/dfu/RNDIS tools/utilities directly from NuttX in my main app, to 
load and check new binaries to a secondary flash area without needing 
u-boot or MCUboot. I will try mcuboot if it does prove necessary to have 
an intermediate bootloader, or use a simple designed-for-purpose program.

On 01/07/2023 10:56, Tim Hardisty wrote:
> Not directly related to NuttX but I hope you don't mind me asking here.
>
> Bottom line: has anyone used any bootloader other than u-boot to allow usb 
> dfu or RNDIS-type firmware updates, and that easily boot NuttX?
>
> My board uses the usual SAMA5 methodology of AT91 bootstrap->u-boot->NuttX. 
> It all works as expected, as far as running code is concerned, but I simply 
> cannot get u-boot to enable the USB port for DFU or RNDIS functions and I 
> need the product to have user-friendly in-field updates, ideally without me 
> having to write any PC update software.
>
> U-boot has defeated me for over 2 weeks now, and simply refuses to even 
> "activate" the USB (i.e. a PC never even sees the connect let alone any 
> functionality: yes, the USB port does work for NuttX and sam-ba code 
> flashing); device trees are the invention of the devil; and an unholy 
> apparent mish mash of driver model and "legacy" modes; no SAM boards in the 
> u-boot trees appearing to have relevant config options I can copy. Add to 
> that: using latest u-boot rather than the 2020 version I currently have 
> "working"means it won't even find a console serial port any more, the lack of 
> response on the relevant AT91 u-boot github to questions, and I am just about 
> ready to give up :(
>
> But I need a bootloader!
>



Re: Build error 12.2.0

2023-07-06 Thread Gregory Nutt




Jokes aside, I thin we need to release 12.2.1 with a fix, what do you
think Alin?


If you decide to do another release, I would think that a 12.2.1 release 
should also include #9716.  This is a pretty serious problem to be in 
release code as well:


https://github.com/apache/nuttx/pull/9716

https://github.com/apache/nuttx/issues/9695