Closed pryan1k69 closed 1 year ago
A double forward slash is probably the problem but why it's there I don't know!
I have solved this issue. It was necessary to add the configuration setting to defconfig
file:
CONFIG_ARCH="arm" # for example
CONFIG_ARCH_BOARD="board-name"
CONFIG_ARCH_BOARD_board-name=y
CONFIG_ARCH_CHIP="chip-name"
CONFIG_ARCH_CHIP_chip-name=y
located in configs/nsh
folder in boards
folder.
I have solved this issue. It was necessary to add the configuration setting to
defconfig
file:
Are you editing the defconfig files by hand? That would be a bad idea. You will make a lot of mistakes and this will cost you time to fix. You should do:
make menuconfig
Yes, it was a bad idea to modify defconfig
file. When I enter
make menuconfig
I get a new error. But the problem is that if you do not change defconfig
file, then I do not know how to configure without the error that occurred above
One of the common issues I have seen that looks like this when adding a new board, it not making all the required changes.
in boards/Kconfig
there are three changes you need to make
You need to create an entry here
choice
prompt "Select target board"
default ARCH_BOARD_CUSTOM
---help---
Select the board hosting the architecture. You must first select the
exact MCU part number, then the boards supporting that part will
be available for selection. Use ARCH_BOARD_CUSTOM to create a new
board configuration.
config ARCH_BOARD_AMBER
bool "Amber Web Server"
depends on ARCH_CHIP_ATMEGA128
---help---
This is placeholder for the SoC Robotics Amber Web Server that is based
on the Atmel AVR ATMega128 MCU. There is not much there yet and what is
there is untested due to tool-related issues.
config ARCH_BOARD_ARDUINO_MEGA2560
bool "Arduino Mega 2560"
depends on ARCH_CHIP_ATMEGA2560
---help---
This option selects the Arduino Mega 2560 board featuring the Atmel
Atmega2560 MCU running at 16 MHz.
config ARCH_BOARD_ARDUINO_DUE
bool "Arduino Due"
depends on ARCH_CHIP_ATSAM3X8E
select ARCH_HAVE_LEDS
---help---
This options selects the Arduino DUE board featuring the Atmel
ATSAM3X8E MCU running at 84 MHz.
Add to the list here
config ARCH_BOARD
string
default "amber" if ARCH_BOARD_AMBER
default "arduino-mega2560" if ARCH_BOARD_ARDUINO_MEGA2560
default "arduino-due" if ARCH_BOARD_ARDUINO_DUE
default "arduino-m0" if ARCH_BOARD_ARDUINO_M0
and here
comment "Board-Specific Options"
if ARCH_BOARD_PCDUINO_A10
source "boards/arm/a1x/pcduino-a10/Kconfig"
endif
if ARCH_BOARD_BEAGLEBONE_BLACK
source "boards/arm/am335x/beaglebone-black/Kconfig"
endif
if ARCH_BOARD_C5471EVM
source "boards/arm/c5471/c5471evm/Kconfig"
endif
if ARCH_BOARD_SPRESENSE
source "boards/arm/cxd56xx/spresense/Kconfig"
endif
if ARCH_BOARD_NTOSD_DM320
If you have made those changes you should be able to take an existing config, change the chip and see your board available.
One of the common issues I have seen that looks like this when adding a new board, it not making all the required changes.
in
boards/Kconfig
there are three changes you need to makeYou need to create an entry here
choice prompt "Select target board" default ARCH_BOARD_CUSTOM ---help--- Select the board hosting the architecture. You must first select the exact MCU part number, then the boards supporting that part will be available for selection. Use ARCH_BOARD_CUSTOM to create a new board configuration. config ARCH_BOARD_AMBER bool "Amber Web Server" depends on ARCH_CHIP_ATMEGA128 ---help--- This is placeholder for the SoC Robotics Amber Web Server that is based on the Atmel AVR ATMega128 MCU. There is not much there yet and what is there is untested due to tool-related issues. config ARCH_BOARD_ARDUINO_MEGA2560 bool "Arduino Mega 2560" depends on ARCH_CHIP_ATMEGA2560 ---help--- This option selects the Arduino Mega 2560 board featuring the Atmel Atmega2560 MCU running at 16 MHz. config ARCH_BOARD_ARDUINO_DUE bool "Arduino Due" depends on ARCH_CHIP_ATSAM3X8E select ARCH_HAVE_LEDS ---help--- This options selects the Arduino DUE board featuring the Atmel ATSAM3X8E MCU running at 84 MHz.
Add to the list here
config ARCH_BOARD string default "amber" if ARCH_BOARD_AMBER default "arduino-mega2560" if ARCH_BOARD_ARDUINO_MEGA2560 default "arduino-due" if ARCH_BOARD_ARDUINO_DUE default "arduino-m0" if ARCH_BOARD_ARDUINO_M0
and here
comment "Board-Specific Options" if ARCH_BOARD_PCDUINO_A10 source "boards/arm/a1x/pcduino-a10/Kconfig" endif if ARCH_BOARD_BEAGLEBONE_BLACK source "boards/arm/am335x/beaglebone-black/Kconfig" endif if ARCH_BOARD_C5471EVM source "boards/arm/c5471/c5471evm/Kconfig" endif if ARCH_BOARD_SPRESENSE source "boards/arm/cxd56xx/spresense/Kconfig" endif if ARCH_BOARD_NTOSD_DM320
If you have made those changes you should be able to take an existing config, change the chip and see your board available.
Yes, I did as you say. But the error remains exactly the same, although my board is displayed in the list of available
Unless I missed it, was is the different error you now get?
In the last year I have found I need to do a distclean and/or make apps_clean to clear odd errors and recently came across make olddefconfig ( the exact name is from memory) which is undocumented but might be something to do with bringing old defconfig up to date with newer NuttX versions?
The error is still the same. That is, it still fails to execute the command: tools/configure.sh -l myboard:nsh
If I understand you correctly, then make distclean
or make olddefconfig
is possible only after configuration
Yes, after a make menuconfig. The // in this doesn't look right though?
/home/allwinner/Desktop/nuttx-master_1/arch//include
Yes
I think there should be board_name, but for some reason it does not see it
@btashton AFAIK when you just create a new board (adding it to those 3 positions at Kconfig) you yet still need to have a boardname/configs/nsh/defconfig adapted to this new board. I think it is a dilemma: we cannot edit the defconfig, but we need a defconfig to use with ./tools/configure.sh to this new board. @patacongo am I missing something on this process?
Always easier to start from a board that is similar and use make menuconfig for changes, then make savedefconfig and copy to a new location.
That's what I did, adding my own boards Kconfig as I grew more familiar with it all.
@btashton AFAIK when you just create a new board (adding it to those 3 positions at Kconfig) you yet still need to have a boardname/configs/nsh/defconfig adapted to this new board. I think it is a dilemma: we cannot edit the defconfig, but we need a defconfig to use with ./tools/configure.sh to this new board. @patacongo am I missing something on this process?
I am not aware of many specific problems with this. The procedure outlined by @TimJTi generally works. I am aware of a couple of things:
make clean_context
, then make menuconfig
Make clean_context also needs documenting
Thanks @TimJTi for the advice on using a similar board and making changes using make menuconfig
.
Thanks to this, I was able to add my board to Nuttx.
The problem is solved.
I want to add my board to Nuttx.
Added as in the official instructions. When I enter
tools/configure.sh -L
then my board is displayed in the list. But when I try to configuretools/configure.sh -l myboard:nsh
an error occurs:I can't figure out what the problem is. Can you help me?