Commit Graph

120 Commits

Author SHA1 Message Date
ligd
412d030149 boards: move USERMAIN_XX out of INIT_ENTRYPOINT
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-12-24 08:23:30 -06:00
Gerson Fernando Budke
24c0e8bc75 boards/arm/samv7/samv71-xult: Add MCUboot support
Refactor to use common sam_progmem implementation and enable MCUboot
support.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-12-16 06:56:42 -03:00
Gerson Fernando Budke
a6fc88740c boards/arm/samv7: Move MCUboot to common folder
Move MCUboot bootloader implementation to samv7 common folder. This drop
all duplicated code and unify implementation.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-12-16 06:56:42 -03:00
Gerson Fernando Budke
b5868aed6f boards/arm/samv7: Introduce common folder
This introduce common folder structre and rework scripts & tools
files. The linker scripts were reorganized to use best the current
infrastructure which uses a template to create a final samv7.ld
file based in the current SoC memories and bootloader definitions.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-12-16 06:56:42 -03:00
Gerson Fernando Budke
463fbfe975 boards/arm/samv7: Unify linker scripts
After define memory sizes for samv7 it is possible unify linker scripts.
This add necessary changes to perform such operation.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-12-16 06:56:42 -03:00
Gerson Fernando Budke
2dd5578d50 arch/arm/src/samv7/Kconfig: Define mem sizes
Current samv7 platform does not define SoC memories sizes. This define
both internal flash and sram memories sizes and update all defconfig
files.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-12-16 06:56:42 -03:00
Petro Karashchenko
d4a5003376 board/same70-xplained: MCUboot related improvements
- simplify LDSCRIPT file name selection
- rename CONFIG_SAME70XPLAINED_APP_FORMAT_MCUBOOT to
  CONFIG_SAME70XPLAINED_FORMAT_MCUBOOT
- fix usage of SAME70XPLAINED_PROGMEM_OTA_PARTITION
  config option

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-11-29 23:53:46 -06:00
Petro Karashchenko
4b2b7d1d91 boards/same70-qmtech: add support of SAME70 QMTECH board
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-11-29 11:17:47 -06:00
Petro Karashchenko
31809724e1 boards/same70-xplained: disable systick before loading MCUboot application
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-11-28 20:33:53 -06:00
Gerson Fernando Budke
5c1cefd09d boards/arm/samv7/samv71-xult: Set console at usart1
Set default console port to USART1. This allows easy access to serial
console by embedded debug CDC-ACM driver.

The README is updated with correct information about PB04 use once
samv71-xult can only be debugged using SWD mode. This means that it is
safe use CDC-ACM as default serial console.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-11-28 20:32:13 -06:00
Petro Karashchenko
919aeced30 boards/same70-xplained: fix usage of SAMV71XULT instead of SAME70XPLAINED
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-11-27 16:06:48 -03:00
Petro Karashchenko
7ba330dff1 boards/same70-xplained/scripts: fix memory region size for MCUboot app
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-11-27 16:06:31 -03:00
Michal Lenc
500738757f boards/arm/samv7/same70-xplained: update adc defconfig with DMA support
Updates defconfig for example application to take the advantage of DMA
support and Timer/counter trigger.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2021-11-27 06:17:45 -06:00
Petro Karashchenko
510154299b boards/same70-xplained: initial support of MCUboot
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Co-authored-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-11-26 14:55:34 -03:00
Michal Lenc
3db9549fce boards/arm/samv7/same70-xplained: add support for AFEC (ADC) driver
This commit adds board level support for Analog Front End driver to
SAME70 Xplained boaed. Example application can be run via adc
configuration.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2021-11-07 21:04:56 -06:00
Alan C. Assis
099e9fb4f7 boards: Remove -nostartfiles -nodefaultlibs from LDFLAGS 2021-09-13 08:58:25 +08:00
YAMAMOTO Takashi
58bdcbab9b Revert "Make: use gcc as LD"
This reverts commit 45672c269d.

Because:

* It's very confusing to have cc as LD.
* I don't see what "-nostartfiles -nodefaultlibs" in LDFLAGS are
  supposed to do when we use LD directly. It would be simpler to
  remove them from our LDFLAGS.
2021-09-08 09:40:48 +08:00
Alin Jerpelea
df088c39f0 author: Anthony Merlino : update licenses to Apache
Verge Aero has submitted the SGA

Anthony Merlino has submitted the SGA

Gregory Nutt has submitted the SGA

Sebastien Lorquet has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-06 20:38:14 +08:00
Alin Jerpelea
fd3b87e115 boards: author: Gregory Nutt: update licenses to Apache
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-08-31 12:38:47 -03:00
Xiang Xiao
b12f588140 Rename CONFIG_LIB_BOARDCTL to CONFIG_BOARDCTL
since boardctl isn't a libc feature

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-06 13:58:26 +02:00
Xiang Xiao
5025fbef8d Rename LIB_ to LIBC_ for all libc Kconfig
follow other libc component naming convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-05 19:45:24 +02:00
Xiang Xiao
007adc7736 Replace all __attribute__((section(x)) with locate_data(x)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-29 21:55:21 -03:00
Xiang Xiao
b3f9ffbe72 Replace all __attribute__((aligned(x)) with aligned_data(x)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-29 21:55:21 -03:00
Jiuzhu Dong
85470176e7 sched/task: delete CONFIG_MAX_TASKS limit
Change-Id: I583015a95dbcebd352f81ecb3104ffdbd646a9ec
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-11 19:42:30 -07:00
Alexander Vasiljev
45672c269d Make: use gcc as LD 2021-06-10 03:43:18 -07:00
Jaroslav Beran
4494ed8a5d samv7/samv71-xult: Add board support for ST7789 LCD controller
SPI0 is used for the connection of the LCD controller.

Additional SPI and GPIO signals definitions:

SPI0_NPCS1 - SPI Chip Select, PD25
GPIO_LCD_CD - Command/Data, pin PB2
GPIO_LCD_RST - Reset, pin PB3

boards/arm/samv7/samv71-xult/src/sam_st7789.c is
derived from boards/arm/imxrt/teensy-4.x/src/imxrt_st7789.c

Signed-off-by: Jaroslav Beran <jara.beran@gmail.com>
2021-06-03 21:33:52 -05:00
Xiang Xiao
2e54df0f35 Don't include assert.h from public header file
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-03 08:36:03 -07:00
YAMAMOTO Takashi
c20ed229b1 refresh configs 2021-06-03 10:05:33 -05:00
Huang Qi
f4a0b7aedd libc: Call pthread_exit in user-space by up_pthread_exit
Drop to user-space in kernel/protected build with up_pthread_exit,
now all pthread_cleanup functions executed in user mode.

* A new syscall SYS_pthread_exit added
* A new tcb flag TCB_FLAG_CANCEL_DOING added
* up_pthread_exit implemented for riscv/arm arch

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2021-05-21 22:46:52 -06:00
Gregory Nutt
bb9b58bdde libc: Move pthread_create to user space
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Change-Id: I5c447d94077debc79158686935f288e4c8e51e01
2021-05-21 22:46:52 -06:00
Xiang Xiao
11ef8a3201 board: Enable CONFIG_BOARDCTL_ROMDISK
to fix build break by commit 3156aa7532

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-13 10:44:16 -05:00
Alin Jerpelea
f8420a9e47 boards: nxstyle fixes
fixes for nxstyle errors reported by the tool.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-06 12:50:41 -05:00
Brennan Ashton
4851d232c0 usbhost: Do not disable usb monitor if usb host is enabled but dev is not 2021-03-28 23:34:01 -05:00
Xiang Xiao
e14c458747 mm/heap: Move semaphore related declaration to private header
since other subsystem doesn't need call these function anymore

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Idfb217c412db62d9f17f427310b75bb78785dc50
2021-03-22 15:35:32 +01:00
Alin Jerpelea
6f14299dd0 boards: nxstyle fixes
nxstyle fixes to pass the CI check

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-18 22:58:27 -07:00
Alin Jerpelea
40cd67eee6 boards: arm: Author Gregory Nutt: update licenses to Apache
Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-18 22:58:27 -07:00
Jiuzhu Dong
59eb4fa8d6 fs: delete NFILE_DESCRIPTORS for allocating dynamically
Change-Id: Id06d215063796d222b9792d25ab2d6742167729f
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-17 06:46:42 -07:00
YAMAMOTO Takashi
4494a2a501 boards/arm/samv7/samv71-xult/src/sam_bringup.c: CONFIG_BCH 2021-03-17 01:25:16 -07:00
YAMAMOTO Takashi
dd86f7d461 boards/arm/samv7/same70-xplained/src/sam_bringup.c: CONFIG_BCH 2021-03-17 01:25:16 -07:00
Gustavo Henrique Nihei
330eff36d7 sourcefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
Gustavo Henrique Nihei
47cb41c92f makefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
Alin Jerpelea
0a797f1e8b boards: Makefile: Author Gregory Nutt: update licenses to Apache
Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-05 04:08:55 -08:00
Xiang Xiao
151cf49562 Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-01 09:23:09 +09:00
Xiang Xiao
9473434587 Ensure the kernel component don't call userspace API
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-01 09:23:09 +09:00
Gustavo Henrique Nihei
07900cdce9 Fix typo in "repetitions" word 2021-02-23 07:18:33 -08:00
YAMAMOTO Takashi
2ceace2059 boards/arm/samv7/samv71-xult/src/sam_ili9488.c: Fix a syslog format 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
0e81c2d95d boards/arm/samv7/samv71-xult/src/sam_ethernet.c: Fix a syslog format 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
ec5079c9ff boards/arm/samv7/same70-xplained/src/sam_ethernet.c: Fix a syslog format 2020-12-02 02:53:47 -06: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
eb4121ce38 Change all 'Nuttx' to 'NuttX'
Unify the naming convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-20 01:45:06 -07:00