Commit Graph

56 Commits

Author SHA1 Message Date
Xiang Xiao b329e2377d boards: Move toolchain related variables to Toolchain.defs
1.It make sense to let Toolchain.defs give the default value
2.The board can still change if the default isn't suitable
3.Avoid the same definition spread more than 200 Make.defs

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ic2649f1c7689bcf59c105ca8db61cad45b6e0e64
2020-07-20 17:10:37 +01:00
Xiang Xiao ee875b2a26 boards: Move HOSTCC/HOSTCFLAGS to tools/Config.mk
Make.defs under board folder can still overwrite the default as needed

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I1c300a8ace4b54d475ef8d398661ed65ca273a2e
2020-07-15 19:14:58 +01:00
Xiang Xiao d32e9c38df boards: Move the C/C++ search path to the common place
so all boards support uClibc++/libc++ automatically

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ibe6fafbec57f7acb26ea6188a3e9923ea82295c5
2020-07-13 15:11:12 -03:00
chao.an d938e2cd46 CI check: fix nxstyle warning
nxstyle fixes to reduce the CI warnings

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-07-02 01:53:23 -05:00
Xiang Xiao 24262a4ddb Fix nxstyle issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-06-07 19:28:10 +01:00
Xiang Xiao 7a18ebe459 drivers/led: Extend userled_set_t from 8bits to 32bits
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I5701b42ff930998198b1d915316cc4f2d085d4eb
2020-06-07 19:28:10 +01:00
Xiang Xiao 76965474ac drivers/led: Let board_userled_initialize return the led number
so the lower half driver don't need include the specific board.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Icf6638a6865bac42150b5957376e55909f041d40
2020-06-07 19:28:10 +01:00
Xiang Xiao a61b8a13c6 Fix nxstyle issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-06-07 19:28:10 +01:00
Xiang Xiao 1b47aa1cb2 drivers/button: Let board_button_initialize return the button number
so the lower half driver don't need include the specific board.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I2ff5c30049a5c5e8ee90baea56e9f4cb1a8a4f87
2020-06-07 19:28:10 +01:00
liuhaitao d05cca0d91 boards/mips: restore OUTPUT_FORMAT and OUTPUT_ARCH for mips link scripts
Restore OUTPUT_FORMAT and OUTPUT_ARCH for mips link scripts to fix Nightly build break logs:
p32-ld: pic32mx_head.o: compiled for a little endian system and target is big endian
p32-ld: pic32mx_head.o: endianness incompatible with that of the selected emulation
p32-ld: failed to merge target specific data of file pic32mx_head.o

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-06-03 18:31:21 +08:00
Xiang Xiao 4fe35cc87c boards: Remove OUTPUT_FORMAT and OUTPUT_ARCH from ld script
let toolchain decide the correct value base on the command line

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I342db6a88e4a161a322a8fea48a59e6ca7617ae6
2020-06-02 07:11:54 -06:00
Gregory Nutt 8190041472 boards/mips: Leverage PR 1150 to MIPS make.defs. 2020-05-31 10:15:22 -03:00
Xiang Xiao 8b20b97d26 build: Remove the dummy drivers folder under boards
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-24 20:20:12 +01:00
Xiang Xiao e83c1400b6 build: Move BOARD_DIR definition to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-24 20:20:12 +01:00
Xiang Xiao 7e5b0f81e9 build: Replace -I with INCDIR
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-24 20:20:12 +01:00
Xiang Xiao 23668a4b9b build: Remove the empty variable assignment
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-24 08:24:13 -06:00
Xiang Xiao dd61d3d9f9 build: Remve the unnecessary .gitignore
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-23 18:00:40 +01:00
Xiang Xiao 1a95cce1a3 build: Move .config check to the top Makefile
remove the workaround to handle the inexistence of .config/Make.defs

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-20 17:57:34 +01:00
Xiang Xiao 7faf3c0254 build: replace ${TOPDIR} with $(TOPDIR) in Makefile
make the usage consistence

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-19 19:23:18 +01:00
Xiang Xiao 567962bd62 build: Move the extension definition to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-19 19:23:18 +01:00
Xiang Xiao 8b42ee421a build: Move MKDEP definition to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-19 19:23:18 +01:00
Xiang Xiao 9ec9431706 build: Move DIRLINK/DIRUNLINK definition to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-19 19:23:18 +01:00
Xiang Xiao bd656888f2 build: Replace WINTOOL with CYGWIN_WINTOOL Kconfig
so the correct value can be determinated by Kconfig system automatically

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-18 15:02:55 -06:00
Nathan Hartman 8d985819b3 Fix typos
Comments only. No functional changes.
2020-05-14 10:49:44 -06:00
Ouss4 32597a763a arch/mips: Fix file naming. 2020-04-26 20:56:30 -06:00
Nathan Hartman d6f7821b15 Docs and comments: Change OSX -> macOS
Mac OS X was renamed to macOS at some point. Update references to
OSX, OS X, Mac OS X, Mac OSX, and other permutations, to macOS,
in README files and in comments of other files.
2020-04-26 07:48:33 -06:00
Xiang Xiao f2d4e1e2b7 Follow up change in apps "nshlib: Rename sh to source"
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-19 08:07:54 -06:00
liuhaitao 459ad99373 Use EXTRAFLAGS instead of EXTRADEFINES to be used by make via command line
So call 'make EXTRAFLAGS=-Wno-cpp' could suppress the warnings with pre-processor
directive #warning in GCC.

Change-Id: Iaa618238924c9969bf91db22117b39e6d2fc9bb6
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-04-11 08:31:08 -06:00
YAMAMOTO Takashi 1ffa009c8b Revert "Don't generate .depend anymore"
This reverts commit 79af7fbf4e.

Because:

* btashton reported some issues in local builds:

  https://github.com/apache/incubator-nuttx/pull/603#issuecomment-602264860

* this might be related to the current CI breakage:

  > /bin/sh: 1: /__w/incubator-nuttx/incubator-nuttx/nuttx/tools/mkdeps: not found
2020-03-22 23:07:29 -05:00
Xiang Xiao 79af7fbf4e
Don't generate .depend anymore 2020-03-22 18:15:29 +00:00
Ouss4 9daa8441e3 tools/pic32: Add the Config.mk file to execute the post build script.
Update Make.defs and README.txt files in boards directory accordingly.
2020-03-07 08:35:20 -06:00
Ouss4 0d88073644 toos/pic32: Some cosmetic changes.
- Rename the folder to PIC32.
  - Rename the Makefile to Makefile.host
  - Run nxstyle on the C file.
  - Change licenses to ALv2.
2020-03-07 08:35:20 -06:00
Xiang Xiao cde88cabcc Run codespell -w with the latest dictonary again
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-23 22:27:46 +01:00
Xiang Xiao bd4e8e19d3 Run codespell -w against all files
and fix the wrong correction
2020-02-22 14:45:07 -06:00
Xiang Xiao dcaaf2d912 ramlog: Remove all ramlog_consoleinit related code
Because we can get the same function by CONSOLE_SYSLOG/syslog_console_init.
BTW, it isn't a good choice to use g_ramlogfops as /dev/console since nsh
will read back what it send out which will surprise most people.
2020-02-18 12:57:43 -06:00
Xiang Xiao 5c80b94820 Replace #include <semaphore.h> to #include <nuttx/semaphore.h>
Since the kernel side should call nxsem_xxx instead and remove the unused inclusion
2020-02-01 08:27:30 -06:00
Xiang Xiao 68951e8d72 Remove exra whitespace from files (#189)
* Remove multiple newlines at the end of files
* Remove the whitespace from the end of lines
2020-01-31 09:24:49 -06:00
Xiang Xiao 540e947c0c Run ./tools/refresh.sh --silent all 2020-01-22 20:47:18 -06:00
liuguo09 14a2db7ffa boards/mips/pic32mx: Add pinguino-debug.ld for PIC32MX boards (#138)
Add pinguino-debug.ld for PIC32MX boards to fix build break under
PINGUINO gcc toolchain. All pinguino-debug.ld copy from the original
mips debug/release ld scripts.

Change-Id: Ie47a2523470cc9996d007bc4afbf9cb40e51ae5b
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-01-21 12:48:25 +01:00
Xiang Xiao 6a3c2aded6 Fix wait loop and void cast (#24)
* Simplify EINTR/ECANCEL error handling

1. Add semaphore uninterruptible wait function
2 .Replace semaphore wait loop with a single uninterruptible wait
3. Replace all sem_xxx to nxsem_xxx

* Unify the void cast usage

1. Remove void cast for function because many place ignore the returned value witout cast
2. Replace void cast for variable with UNUSED macro
2020-01-02 10:54:43 -06:00
Ouss4 54e09340d5 boards/mips/pic32mz/pic32mz-starterkit/src/pic32mz_userleds.c: Use the pinset_t type when manipulating IOs. 2019-11-23 09:00:43 -06:00
Nathan Hartman 46aaec7ba0 Fix minor typos in docs and comments. 2019-09-29 12:52:20 -06:00
Juha Niskanen 5c853cd1dc libs/libc/unistd/lib_getcwd.c: remove stray sched_unlock(). Also fixes several typos. 2019-09-20 06:23:48 -06:00
Juha Niskanen e8b5dd4528 Fix use of undefined pp-token #errror, other typos. 2019-09-19 18:19:18 -06:00
Gregory Nutt 5995714cfd boards/mips Linker Scripts: The PIC32M* start-up code initializes .bss by writing 16 bytes at a time in a loop. The start (_sbss) alignment is only required to be 4 bytes since the write is done with 4 store instructions. In a previous change, the end address, _ebss, was aligned to 16 byte to prevent initializing past the end off the .bss region. However, that does not work unless the start address, _sbss, is also aligned to 16 bytes. 2019-09-16 08:14:32 -06:00
Gregory Nutt 805fa49a4e Back out/change some of the alignments in the previous comments. Non-ARM CPUs my have different alignment requirements. AVR, for example, has none. MIPS requires 16-byte alignment of the end of .bss. 2019-09-15 18:02:00 -06:00
Gregory Nutt 2925c28f8f All linker scripts: Preface all _edata defininitions with . = ALIGN(4). Otherwise, the last bytes in the .data section may not be initialized properly. Also convert all linker scripts indent in units of 8-spaces to units of 4-spaces. 2019-09-15 17:22:16 -06:00
Gregory Nutt 0bd60c3722 All linker scripts: Preface all _ebss defininitions with . = ALIGN(4). Otherwise, the last bytes in the .bss section will not be initialized properly. Also convert all linker scripts that use TABs to spaces. 2019-09-15 15:27:58 -06:00
Nathan Hartman 366053e464 Fix typos, 1 in a #define, others in comments. This changes one definition: _MQ_TIMEDRECIEVE is changed to _MQ_TIMEDRECEIVE. It appears this symbol is not used anywhere. 2019-09-11 08:56:56 -06:00
Ouss4 c8b1dcc5ab boards/mips/pic32mx&z/drivers/Kconfig: The drivers folder was one level above where it should be. 2019-08-24 14:28:44 -06:00