Commit Graph

1000 Commits

Author SHA1 Message Date
Simon Piriou
5892927aea board: add ADB example for stm32/photon 2020-11-12 21:35:07 -08:00
Xiang Xiao
e5ab2e56f8 sim: Remove cxxtest specifial Make.defs
since the special c++ setup doesn't need anymore

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-11-12 14:37:59 +08:00
dongjiuzhu
2482052228 driver/sensor: user specifies device register number
N/A

Change-Id: Idd11461f933dd21b7271cd3ca87a2e33127a9d34
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-11 18:25:22 -08:00
dongjiuzhu
0d92e50c42 sim/sensor: add sensor defconfig
Change-Id: Ib9b6866951b46f34aa9faaa1c9a6edb0b217b719
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-11 18:25:22 -08:00
chao.an
e29a0d9dc6 boards/lpc31xx/pgnsh: disable environment variable support
locked region is unenough to accommodate more text in PASS1 phase

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 23:42:46 -08:00
chao.an
c6fe82bfa1 boards/sim: enable run-time type identification
BTW, correct some cxx compilation options

Change-Id: Id3e3eab2020ef1991d2760426d81b40e6e5eff4e
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 18:52:28 -08:00
chao.an
80e372ad14 boards/sim: correct the ARCHDEFINES definition
ARCHDEFINESXX -> ARCHDEFINES

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 18:51:21 -08:00
Matias N
f55a2879ca nrf52 GPIO/GPIOTE: better expose pin interrupt capability
This change improves upon current support for pin interrupts. Before,
a pin interrupt was handled (with nrf52_gpiote_setevent) using one
of the eight available GPIOTE channels. Moreover, it didn't event let
the user specify which channel to use (simply tried to get a free one).
Also, it was buggy since it did not consider unsetting the callback.

Besides GPIOTE channels, there is another way to deal with pin interrupts.
The GPIO peripheral is capable of generating a PORT event
(for the whole GPIO port) depending on the pin SENSE configuration
(HIGH or LOW, or NONE) and GPIO DETECTMODE register
(latching or non-latching).

This change then renames nrf52_gpiote_setevent into nrf52_gpiote_set_ch_event,
maintaining functionality of original function, but now allows specifying
channel (and correctly handles unsetting the callback). Then, a
new nrf52_gpiote_set_pin_event is added, which allows to set a callback
for a given pin. During initialization, interrupt for the PORT event is
enabled and handled in such way that for each pin whose corresponding
bit in LATCH register (indicates the result of pin SENSEing) the
callback for this pin will be invoked. This mechanism means that
every pin can get an ISR. It also avoids using GPIOTE channels for this
purpose which carry higher current consumption.

This new per-pin callback mechanism has some added memory requirement
so it can be disabled and its default is dependant on DEFAULT_SMALL.
When disabled, a callback for the PORT event can be set directly
with nrf52_gpiote_set_port_event

There was only one use of nrf52_gpio_setevent() which was migrated
into nrf52_gpio_set_ch_event() passing channel zero.
2020-11-09 20:23:29 +01:00
raiden00pl
728c3fc409 nrf52840-dk: add sx127x example configuration 2020-11-09 08:07:13 -08:00
Sara Souza
8a1960fdf4 Documentation for Watchdog Timer Driver 2020-11-09 08:06:10 -08:00
Juha Niskanen
5849d88288 boards/sim/sim/sim/src/sim_touchscreen.c: add missing nx_disconnect
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-11-08 15:25:10 -03:00
Sara Souza
b9d44017cf xtensa/esp32: Watchdog support (MWDTs) 2020-11-08 13:05:24 -03:00
Brennan Ashton
ab176cf1d3 sim: Enable required CONFIG_SIM_FRAMEBUFFER 2020-11-07 22:59:42 -08:00
Brennan Ashton
05dc66ed29 Fix issue #2098 non functional sim:touchscreen
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-11-07 22:59:42 -08:00
Alan C. Assis
816af60b77 xtensa/esp32: Include cache workaround to PSRAM 2020-11-07 12:08:02 +01:00
Abdelatif Guettouche
f052a9b1e6 baords/xtensa/esp32/esp32-core: Update all configs to add the new region
of memory.
2020-11-06 18:36:41 -03:00
Abdelatif Guettouche
2ac2ce55d2 arch/xtensa/src/esp32/esp32_allocateheap.c: Fix the memory regions with
regards to the data used by the ROM.
Static alloaction sections should end at the begining of the ROM data.
The rest of memory (End of ROM data --> End of DRAM) is added to the
heap.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-11-06 18:36:41 -03:00
dongjiuzhu
9c19db6e14 rc/dummy: enable dummy driver and add rc defconfig
N/A

Change-Id: I760593ec578361deffea2db6d7c8a02d47c6f83b
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-05 11:38:28 -03:00
Daniel P. Carvalho
e73e03a33f Add fuction to set timer frequency. 2020-11-05 11:36:40 -03:00
Daniel P. Carvalho
3f6157001a Change SPWM example to enable timer after configure timer clock. 2020-11-05 11:36:40 -03:00
Brennan Ashton
54832f37f2 sim: Initial Linux i2c bus support
This adds the inital wiring for i2c bus support in the sim target
and for Linux host adds the lower half that uses the i2c chardev.

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-11-04 23:51:09 -08:00
ligd
73282fe2d8 arch/sim: add sim alsa support
Squashed commit of the following:

sim audio: call alsa to playback/capture data
sim/audio: correct the format capability
sim/audio: add pause/resume support
sim/audio: add auto stop when meet AUDIO_APB_FINAL
sim/audio: fix abort when set small buffer_size
sim/audio: move sim_audio.c to sim_alsa.c

Change-Id: I8e00ece79159e844ca17fd4c363480b985ee0490
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-11-04 05:48:14 -08:00
Dong Heng
b54f0edff4 xtensa/esp32: Add Partition and OTA device 2020-11-03 21:54:07 +01:00
Frank-Christian Kruegel
52097a4345 Added Support for more TI Tiva Microcontrollers:
* TM4C123GH6PZ (100 pin version of TM4C123GH6PM)
* TM4C123GH6PGE (144 pin version of TM4C123GH6PM)
* TM4C129ENCPDT (TM4C1294 with Crypto hardware added, TQFP package)
* TM4C129ENCZAD (TM4C1294 with Crypto hardware added, BGA package)
2020-11-03 08:07:24 -08:00
Matias N
fea3ee28f7 sim: support LCD emulation over X11; correctly decouple LCD/FB from X11/NX 2020-11-02 19:22:05 -08:00
Xiang Xiao
9208176f60 build: Move __NuttX__ definition to tools/Config.mk
ensure this critical macro get defined in all projects

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-11-02 13:22:39 -03:00
chao.an
b88561299b make/expression: improving up asm/C/C++ compile times
In the current compilation environment, the recursive assignment(=) for compile
flags will be delayed until every file is actually need to be compile.

For example:
--------------------------------------------------------------------------------
arch/arm/src/Makefile:

INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip}
INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)common}
INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)$(ARCH_SUBDIR)}
INCLUDES += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)sched}

CPPFLAGS += $(INCLUDES) $(EXTRAFLAGS)
CFLAGS += $(INCLUDES) $(EXTRAFLAGS)
CXXFLAGS += $(INCLUDES) $(EXTRAFLAGS)
AFLAGS += $(INCLUDES) $(EXTRAFLAGS)
--------------------------------------------------------------------------------

All compilation options will be included recursively,
which will be delayed until the compilation options are actually used:

tools/Config.mk:

--------------------------------------------------------------------------------
define COMPILE
  @echo "CC: $1"
  $(Q) $(CC) -c $(CFLAGS) $($(strip $1)_CFLAGS) $1 -o $2
endef
--------------------------------------------------------------------------------

All compile flags to be reexecuted $(INCDIR) as long as one file needs to be compiled,
but in fact, the compilation options have not changed in the current directory.

So the we recommand to change the syntax of assignment
From
    Recursive (=)
To
    Simple    (:=)

In this way, we can ensure that all compilation options are expanded only once and reducing repeated works.

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-02 07:53:53 -08:00
Xiang Xiao
cc869d891c boards/cxd56xx: Remove HOSTCC and HOSTCFLAGS from Make.defs
since all host toolchain definition is moved to the common place(tools/Config.mk)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-11-02 09:11:37 +01:00
YAMAMOTO Takashi
1184502661 Retire CONFIG_WCHAR_BUILTIN
wchar_t is always a builtin type for C++.

Note: boards/arm/stm32/nucleo-f4x1re/scripts/Make.defs was broken.
(missing -)
2020-11-01 18:19:13 -08:00
Sebastian Ene
2073730d1a arch/sim: Update defconfig for NXWM and disable CONFIG_NSH_ARCHINIT
## Summary of changes

Disable CONFIG_NSH_ARCHINIT to prevent the boardctl() logic to call
multiple times the oneshot_register() function. The boardctl logic is
already called from nxwm_main.

Signed-off-by: Sebastian Ene <sene@apache.org>
2020-10-31 07:17:15 -07:00
Matias N
3f21d902bc sim: add LVGL configuration which uses the X11 framebuffer and mouse 2020-10-29 23:48:12 -07:00
Matias N
4cbfbd0c74 nrf52_wdt: split into low-level API and watchdog driver lower-half
This separation allows to interact with the watchdog from OS code,
for example initiating the watchdog very early on boot. Moreover,
these changes make the lower-half driver support an already running
watchdog, which may happen if there's a bootloader which already
started it.
2020-10-29 20:17:33 -03:00
Yoshinori Sugino
c13f869432 Modify SIGSTP to SIGTSTP
Follow the POSIX description.
SIGTSTP should be sent when the Ctrl-Z characters is encountered, not SIGSTP.

Testing:
Built with hifive1-revb:nsh (CONFIG_SERIAL_TERMIOS=y, CONFIG_SIG_DEFAULT=y and CONFIG_TTY_SIGTSTP=y)
2020-10-29 01:12:43 -07:00
Brennan Ashton
162da1169e CI: Store artifacts durring build
Add new option -A is added to tools/testbuild.sh that will take the
created build executable and store it in a folder for the config
that generated it under $ARTIFACTDIR which can be set via an
environment variable or defaulted to $(TOPDIR)/buildartifacts

This is also helpful for local testing because you can now run
tools/testbuild.sh -A sim.dat and have all of the simulation
targets generated without having to rebuild along the way.

In the GitHub Actions workflow the artifacs are uploaded
two two bundles one for macOS and one for Linux

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-10-28 11:32:21 -07:00
zhongan
c9dd19f4c9 sim:rpproxy/rpserver: force use 'CONFIG_SIM_M32' for 64bit system.
Change-Id: I3f240bd7761b42bddfb8c899dad63a0df5a6ac7f
Signed-off-by: zhongan <zhongan@xiaomi.com>
2020-10-28 10:08:47 -07:00
Alin Jerpelea
bc8ea75580 tools: cxd56: mkspk: automate mkspk build
the mkspk tool will automaticaly be built if CONFIG_CXD56_BINARY
is set.

Test:
nuttx.spk was succesfully generated

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2020-10-28 12:50:02 +01:00
Sara Souza
ddc0d30063 xtensa/esp32: Added Userled support 2020-10-27 15:38:03 -03:00
liuhaitao
8342d2932f sim: update loadable/module/sotest configs readme
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-10-26 21:42:59 -07:00
Huang Qi
15d658403a sim/duktape: Increase stack size to fix broken
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2020-10-26 18:20:02 -03:00
Sebastian Ene
efbcb2cd31 arch/sim: Enable SIM_WALLTIME option by default
### Summary of Changes ###

Running the NuttX simulation 'as fast as possible' breaks the features
that depend on timing: eg. the Bluetooth stack. Enabling this option by
default SIM_WALLTIME=y will introduce delays and will tick the simulation at
a real pace.
Refresh defconfigs for sim targets and add depends on SIM_WALLTIME for
SIM_HCISOCKET.

Signed-off-by: Sebastian Ene <sene@apache.org>
2020-10-26 11:01:40 -07:00
Masayuki Ishikawa
8547ea2c72 boards: stm32f4discovery: Update wifi/defconfig
Summary:
- Add CONFIG_ARCH_INTERRUPTSTACK=2048
- Add CONFIG_ARMV7M_LAZYFPU=y
- Add CONFIG_TESTING_OSTEST_FPUSIZE=132

Impact:
- Affects stm32f4discovery:wifi only

Testing:
- Tested with ostest, uSD card, Wi-Fi

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 09:05:49 -07:00
Masayuki Ishikawa
d550e39b9e boards: sabre-6quad: Update nsh/defconfig
Summary:
- Add CONFIG_DEBUG_FULLOPT=y
- Add CONFIG_DEBUG_SYMBOLS=y
- Remove CONFIG_HOST_WINDOWS=y
- Add CONFIG_READLINE_CMD_HISTORY=y
- Add CONFIG_STACK_COLORATION=y

Impact:
- Affects sabre-6quad:nsh only

Testing:
- Tested with QEMU

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 09:05:49 -07:00
dongjiuzhu
d452a05910 pollnotify: we should send poll events before semaphore incrementes.
There is a good case on sim platform:
When we input some cmd and click enter key to start application in terminal,
this context will change to application from IDLE loop. Althrough entey key '\r'
has been received to recv buffer and complete post semaphore of reader, but
pollnotify may not be called because context change. So when application run
poll function, because no events happend and poll enter wait, context will
again change to IDLE loop, this pollnotify of IDLE loop will run to send poll
events, poll function of applicaton will wake up. It's wrong!

Change-Id: I812a889f2e90781a9c3cb4b0251cccc4d32bebd1
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-10-26 08:27:09 -03:00
Masayuki Ishikawa
72b182d3d3 boards: sim: Update smp/defconfig
Summary:
- Add CONFIG_DRIVER_NOTE=y
- Add CONFIG_NSH_READLINE=y
- Add CONFIG_READLINE_CMD_HISTORY=y
- Add CONFIG_SCHED_INSTRUMENTATION=y

Impact:
- Affects sim:smp only

Testing:
- Tested with uname/ps/free/hello/smp/ostest

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 03:06:46 -07:00
YAMAMOTO Takashi
d8bee6769a esp32_flash.ld: Avoid having too many sections
Fixes an issue I saw when trying libcxx.

esptool.py has a limit of 16 sections.

It complains like:

    A fatal error occurred: Invalid segment count 23 (max 16).
    Usually this indicates a linker script problem.
2020-10-25 19:42:21 -07:00
Abdelatif Guettouche
9b98f20969 arch/xtensa: Fix the naming of the internal heap functions. They should
be prefixed by xtensa_ instead of up_.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00
Abdelatif Guettouche
c91db9eb40 baords/xtensa/esp32/esp32-core: Refresh all the defconfigs
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00
Abdelatif Guettouche
f0ae1dd54a arch/xtensa/src/esp32: Fix PR #1958 nxstyle issues.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00
Abdelatif Guettouche
430e2d766d boards/xtensa/esp32/esp32-core/configs: When there is no PSRAM, only one
memory region is available.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00
Abdelatif Guettouche
1b12d20225 arch/xtensa/src/esp32/esp32_spiflash.c&esp32_spi.c: Allocate a buffer from DRAM
when the given buffer is from PSRAM.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00