Coder Social home page Coder Social logo

apache / nuttx-apps Goto Github PK

View Code? Open in Web Editor NEW
250.0 29.0 472.0 21.46 MB

Apache NuttX Apps is a collection of tools, shells, network utilities, libraries, interpreters and can be used with the NuttX RTOS

Home Page: https://nuttx.apache.org/

License: Apache License 2.0

Makefile 3.77% C 68.55% Shell 0.18% C++ 24.53% Lex 0.42% Python 0.48% Batchfile 0.02% Nim 0.04% CMake 1.97% HTML 0.03% CSS 0.02%
nuttx rtos embedded real-time mcu microcontroller

nuttx-apps's Introduction

Application Folder

Contents

  • General
  • Directory Location
  • Built-In Applications
  • NuttShell (NSH) Built-In Commands
  • Synchronous Built-In Commands
  • Application Configuration File
  • Example Built-In Application
  • Building NuttX with Board-Specific Pieces Outside the Source Tree

General

This folder provides various applications found in sub-directories. These applications are not inherently a part of NuttX but are provided to help you develop your own applications. The apps/ directory is a break away part of the configuration that you may choose to use or not.

Directory Location

The default application directory used by the NuttX build should be named apps/ (or apps-x.y.z/ where x.y.z is the NuttX version number). This apps/ directory should appear in the directory tree at the same level as the NuttX directory. Like:

 .
 |- nuttx
 |
 `- apps

If all of the above conditions are TRUE, then NuttX will be able to find the application directory. If your application directory has a different name or is location at a different position, then you will have to inform the NuttX build system of that location. There are several ways to do that:

  1. You can define CONFIG_APPS_DIR to be the full path to your application directory in the NuttX configuration file.
  2. You can provide the path to the application directory on the command line like: make APPDIR=<path> or make CONFIG_APPS_DIR=<path>
  3. When you configure NuttX using tools/configure.sh, you can provide that path to the application directory on the configuration command line like: ./configure.sh -a <app-dir> <board-name>:<config-name>

Built-In Applications

NuttX also supports applications that can be started using a name string. In this case, application entry points with their requirements are gathered together in two files:

  • builtin/builtin_proto.h โ€“ Entry points, prototype function
  • builtin/builtin_list.h โ€“ Application specific information and requirements

The build occurs in several phases as different build targets are executed: (1) context, (2) depend, and (3) default (all). Application information is collected during the make context build phase.

To execute an application function:

exec_builtin() is defined in the apps/include/builtin/builtin.h.

NuttShell (NSH) Built-In Commands

One use of builtin applications is to provide a way of invoking your custom application through the NuttShell (NSH) command line. NSH will support a seamless method invoking the applications, when the following option is enabled in the NuttX configuration file:

CONFIG_NSH_BUILTIN_APPS=y

Applications registered in the apps/builtin/builtin_list.h file will then be accessible from the NSH command line. If you type help at the NSH prompt, you will see a list of the registered commands.

Synchronous Built-In Commands

By default, built-in commands started from the NSH command line will run asynchronously with NSH. If you want to force NSH to execute commands then wait for the command to execute, you can enable that feature by adding the following to the NuttX configuration file:

CONFIG_SCHED_WAITPID=y

The configuration option enables support for the waitpid() RTOS interface. When that interface is enabled, NSH will use it to wait, sleeping until the built-in command executes to completion.

Of course, even with CONFIG_SCHED_WAITPID=y defined, specific commands can still be forced to run asynchronously by adding the ampersand (&) after the NSH command.

Application Configuration File

The NuttX configuration uses kconfig-frontends tools and the NuttX configuration file (.config) file. For example, the NuttX .config may have:

CONFIG_EXAMPLES_HELLO=y

This will select the apps/examples/hello in the following way:

  • The top-level make will include apps/examples/Make.defs
  • apps/examples/Make.defs will set CONFIGURED_APPS += $(APPDIR)/examples/hello like this:
  ifneq ($(CONFIG_EXAMPLES_HELLO),)
  CONFIGURED_APPS += $(APPDIR)/examples/hello
  endif

Example Built-In Application

An example application skeleton can be found under the examples/hello sub-directory. This example shows how a builtin application can be added to the project. One must:

  1. Create sub-directory as: progname

  2. In this directory there should be:

    • A Make.defs file that would be included by the apps/Makefile
    • A Kconfig file that would be used by the configuration tool (see the file kconfig-language.txt in the NuttX tools repository). This Kconfig file should be included by the apps/Kconfig file
    • A Makefile, and
    • The application source code.
  3. The application source code should provide the entry point:

    main()
  4. Set the requirements in the file: Makefile, specially the lines:

    PROGNAME   = progname
    PRIORITY   = SCHED_PRIORITY_DEFAULT
    STACKSIZE  = 768
    ASRCS      = asm source file list as a.asm b.asm ...
    CSRCS      = C source file list as foo1.c foo2.c ..
  5. The Make.defs file should include a line like:

    ifneq ($(CONFIG_PROGNAME),)
    CONFIGURED_APPS += progname
    endif

Building NuttX with Board-Specific Pieces Outside the Source Tree

Q: Has anyone come up with a tidy way to build NuttX with board- specific pieces outside the source tree?

A: Here are three:

  1. There is a make target called make export. It will build NuttX, then bundle all of the header files, libraries, startup objects, and other build components into a .zip file. You can move that .zip file into any build environment you want. You can even build NuttX under a DOS CMD window.

    This make target is documented in the top level nuttx/README.txt.

  2. You can replace the entire apps/ directory. If there is nothing in the apps/ directory that you need, you can define CONFIG_APPS_DIR in your .config file so that it points to a different, custom application directory.

    You can copy any pieces that you like from the old apps/directory to your custom apps directory as necessary.

    This is documented in NuttX/boards/README.txt and NuttX Porting Guide online at https://cwiki.apache.org/confluence/display/NUTTX/Porting+Guide.

  3. If you like the random collection of stuff in the apps/ directory but just want to expand the existing components with your own, external sub-directory then there is an easy way to that too: You just create a symbolic link in the apps/ directory that redirects to your application sub-directory.

    In order to be incorporated into the build, the directory that you link under the apps/ directory should contain (1) a Makefile that supports the clean and distclean targets (see other Makefiles for examples), and (2) a tiny Make.defs file that simply adds the custom build directories to the variable CONFIGURED_APPS like:

    CONFIGURED_APPS += my_directory1 my_directory2

    The apps/Makefile will always automatically check for the existence of subdirectories containing a Makefile and a Make.defs file. The Makefile will be used only to support cleaning operations. The Make.defs file provides the set of directories to be built; these directories must also contain a Makefile. That Makefile must be able to build the sources and add the objects to the apps/libapps.a archive. (see other Makefiles for examples). It should support the all, install, context, and depend targets.

    apps/Makefile does not depend on any hardcoded lists of directories. Instead, it does a wildcard search to find all appropriate directories. This means that to install a new application, you simply have to copy the directory (or link it) into the apps/ directory. If the new directory includes a Makefile and Make.defs file, then it will automatically be included in the build.

    If the directory that you add also includes a Kconfig file, then it will automatically be included in the NuttX configuration system as well. apps/Makefile uses a tool at apps/tools/mkkconfig.sh that dynamically builds the apps/Kconfig file at pre-configuration time.

    You could, for example, create a script called install.sh that installs a custom application, configuration, and board specific directory:

    a) Copy MyBoard directory to boards/MyBoard. b) Add a symbolic link to MyApplication at apps/external. c) Configure NuttX, usually by:

    tools/configure.sh MyBoard:MyConfiguration

    Use of the name apps/external is suggested because that name is included in the .gitignore file and will save you some nuisance when working with GIT.

Export restrictions

This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See http://www.wassenaar.org/ for more information.

The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms. The form and manner of this Apache Software Foundation distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code.

The following provides more details on the included cryptographic software: https://tls.mbed.org/supported-ssl-ciphersuites. https://github.com/intel/tinycrypt

nuttx-apps's People

Contributors

acassis avatar anchao avatar anjiahao1 avatar antmerlino avatar btashton avatar crafcat7 avatar donny9 avatar gary-hobson avatar gregory-nutt avatar guidingli avatar gustavonihei avatar jerpelea avatar juniskane avatar liuguo09 avatar masayuki2009 avatar no1wudi avatar ouss4 avatar papatience avatar pkarashchenko avatar protobits avatar pussuw avatar raiden00pl avatar simbit18 avatar slorquet avatar spresense avatar wengzhe avatar xiaoxiang781216 avatar xuxin930 avatar yamt avatar zhhyu7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nuttx-apps's Issues

Elf loader sample app doesn't build

tested with master

make[3]: Entering directory '/root/nuttx/apps/examples/elf'
make[4]: Entering directory '/root/nuttx/apps/examples/elf/tests'
make[5]: Entering directory '/root/nuttx/apps/examples/elf/tests/errno'
LD: errno.o
arm-none-eabi-ld: warning: cannot find entry symbol _start; defaulting to 00008000
errno.o: In function main': errno.c:(.text+0x2c): undefined reference to fwrite'
errno.c:(.text+0x48): undefined reference to fwrite' errno.c:(.text+0x54): undefined reference to fopen'
errno.c:(.text+0x80): undefined reference to fprintf' errno.c:(.text+0x88): undefined reference to exit'
errno.c:(.text+0x98): undefined reference to __errno' errno.c:(.text+0xb0): undefined reference to fprintf'
errno.c:(.text+0xc8): undefined reference to `_impure_ptr'
make[5]: *** [Makefile:70: errno] Error 1

MCUBoot Agent Feature. Add extra headers.

When downloading images in mcuboot_agent application from a URL with a GET command it would be a good feature to add a function that lets you send board custom headers to the server to indicate board related data.

I am thinking in a OTA Server that serves the firmware image depending in the board ID, Firmware current version, etc...

A function that adds to the webclient_context struct the extra headers could be implement in mcuboot_agent_main.c file in download_firmware_image function like this:

#ifdef CONFIG_MCUBOOT_UPDATE_AGENT_EXTRA_HEADERS
 mcuboot_add_extra_headers(&client_ctx)
#endif

Then mcuboot_add_extra_headers would be defined by the user depending on his concrete server according to its needs...

How do you see this feature?? Could it be a good idea?? @pkarashchenko

PR62 Introduces parameter mismatch

PR 62 introduces a parameter mismatch which must be fixed. Changes lines like:

printf("CHILD: started with arg=%d\n", (intptr_t)arg);

will cause warnings in some environments where there is type checking (like sim). It can also cause parameter mismatches in other cases.

For example, on 64-bit simulation, %d will expect an int argument and sizeof(int) == 32-bits. But intptr_t will be 64-bits so the printf will be wrong. In certain cases, this kind of size mismatch can lead to a crash.

My suggesting is to use the more complex cast (int)((intptr_t)arg). That will both avoid the warning and assure that the value provided to printf is a proper integer type.

LTP cannot compile correctly due to duplicate object file names

When compiling LTP there are missing symbols because the Make.dep file is being built incorrectly.

For example see these entries that are all overriding each other:

โฏ grep "12-1\.home" -A 2 ./Make.dep
12-1.home.bashton.nuttx.wrk.apps.testing.ltp.o: \
 ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/12-1.c \
 /usr/include/stdc-predef.h \
--
12-1.home.bashton.nuttx.wrk.apps.testing.ltp.o: \
 ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_open/12-1.c \
 /usr/include/stdc-predef.h /home/bashton/nuttx/wrk/nuttx/include/stdio.h \
--
12-1.home.bashton.nuttx.wrk.apps.testing.ltp.o: \
 ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/speculative/12-1.c \
 /usr/include/stdc-predef.h /home/bashton/nuttx/wrk/nuttx/include/time.h \
--
12-1.home.bashton.nuttx.wrk.apps.testing.ltp.o: \
 ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/12-1.c \
 /usr/include/stdc-predef.h /home/bashton/nuttx/wrk/nuttx/include/stdio.h \
--
12-1.home.bashton.nuttx.wrk.apps.testing.ltp.o: \
 ltp/testcases/open_posix_testsuite/conformance/interfaces/mmap/12-1.c \
 /usr/include/stdc-predef.h /home/bashton/nuttx/wrk/nuttx/include/stdio.h \
--
12-1.home.bashton.nuttx.wrk.apps.testing.ltp.o: \
 ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/12-1.c \
 /usr/include/stdc-predef.h /home/bashton/nuttx/wrk/nuttx/include/stdio.h \
--
12-1.home.bashton.nuttx.wrk.apps.testing.ltp.o: \
 ltp/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/12-1.c \
 /usr/include/stdc-predef.h \
--
12-1.home.bashton.nuttx.wrk.apps.testing.ltp.o: \
 ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/12-1.c \
 /usr/include/stdc-predef.h /home/bashton/nuttx/wrk/nuttx/include/stdio.h \

This results in a lot of missing symbols, for example:

/usr/bin/ld: nuttx.rel:(.rodata+0xf52c): undefined reference to `ltp_timer_create_speculative_15_1_main'
/usr/bin/ld: nuttx.rel:(.rodata+0xf53c): undefined reference to `ltp_timer_create_speculative_2_1_main'
/usr/bin/ld: nuttx.rel:(.rodata+0xf54c): undefined reference to `ltp_timer_create_speculative_5_1_main'
/usr/bin/ld: nuttx.rel:(.rodata+0xf55c): undefined reference to `ltp_timer_delete_speculative_5_1_main'
/usr/bin/ld: nuttx.rel:(.rodata+0xf56c): undefined reference to `ltp_timer_delete_speculative_5_2_main'
/usr/bin/ld: nuttx.rel:(.rodata+0xf57c): undefined reference to `ltp_timer_getoverrun_speculative_6_1_main'
/usr/bin/ld: nuttx.rel:(.rodata+0xf58c): undefined reference to `ltp_timer_getoverrun_speculative_6_2_main'
/usr/bin/ld: nuttx.rel:(.rodata+0xf5ac): undefined reference to `ltp_timer_gettime_speculative_6_1_main'
/usr/bin/ld: nuttx.rel:(.rodata+0xf5bc): undefined reference to `ltp_timer_gettime_speculative_6_2_main'
/usr/bin/ld: nuttx.rel:(.rodata+0xf5cc): undefined reference to `ltp_timer_gettime_speculative_6_3_main'
/usr/bin/ld: nuttx.rel:(.rodata+0xf5ec): undefined reference to `ltp_timer_settime_speculative_12_1_main'

Additionally I had to make these to be able to support the large amount of command line arguments:
Changes to the OS:

diff --git a/tools/Config.mk b/tools/Config.mk
index 6adbebf21a..6400121281 100644
--- a/tools/Config.mk
+++ b/tools/Config.mk
@@ -328,9 +328,13 @@ endef
 #
 #   CONFIG_WINDOWS_NATIVE - Defined for a Windows native build
 
+define NL
+
+
+endef
+
 define ARCHIVE_ADD
-       @echo "AR (add): ${shell basename $(1)} $(2)"
-       $(Q) $(AR) $1 $(2)
+       $(Q) $(AR) $1 $(2) $(NL)
 endef
 
 # ARCHIVE - Same as above, but ensure the archive is
@@ -467,12 +471,13 @@ define CLEAN
        $(Q) if exist *$(LIBEXT) (del /f /q *$(LIBEXT))
        $(Q) if exist *~ (del /f /q *~)
        $(Q) if exist (del /f /q  .*.swp)
-       $(Q) if exist $(OBJS) (del /f /q $(OBJS))
+       $(Q) $(foreach OBJ, $(OBJS), $(if exist $(OBJS) (del /f /q $(OBJ))))
        $(Q) if exist $(BIN) (del /f /q  $(BIN))
 endef
 else
 define CLEAN
-       $(Q) rm -f *$(OBJEXT) *$(LIBEXT) *~ .*.swp $(OBJS) $(BIN)
+       $(Q) rm -f *$(OBJEXT) *$(LIBEXT) *~ .*.swp $(BIN)
+       $(Q) $(foreach OBJ, $(OBJS), $(rm -f $(OBJ)))
 endef
 endif

And these changes to apps:

diff --git a/Application.mk b/Application.mk
index d1dba985..f606398d 100644
--- a/Application.mk
+++ b/Application.mk
@@ -140,9 +140,9 @@ $(CXXOBJS): %$(SUFFIX)$(OBJEXT): %$(CXXEXT)
 
 archive:
 ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
-       $(call ARCHIVE_ADD, "${shell cygpath -w $(BIN)}", $(OBJS))
+       $(foreach OBJ, $(OBJS), $(call ARCHIVE_ADD, "${shell cygpath -w $(BIN)}", $(OBJ)))
 else
-       $(call ARCHIVE_ADD, $(BIN), $(OBJS))
+       $(foreach OBJ, $(OBJS), $(call ARCHIVE_ADD, $(BIN) $(OBJ)))
 endif
 
 ifeq ($(BUILD_MODULE),y)

The defconfig for the sim is here that I used:

defconfig.txt

READLINE IMPLEMENTATION

  Description: readline implementation does not use C-buffered I/O, but rather
               talks to serial driver directly via read().  It includes VT-100
               specific editing commands.  A more generic readline() should be
               implemented using termios' tcsetattr() to put the serial driver
               into a "raw" mode.
  Status:      Open
  Priority:    Low (unless you are using mixed C-buffered I/O with readline and
               fgetc, for example).

Build failure in apps/ for the 'ping' command

make[2]: Entering directory '/home/jon/controlix-nuttx/nuttx/apps/system/ping'
CC: ping.c
gcc -c -Wall -Wstrict-prototypes -Wshadow -Wundef -O2 -fno-optimize-sibling-calls -fno-omit-frame-pointer -fno-crossjumping -fno-delete-null-pointer-checks -fPIC -fno-builtin -fno-stack-protector -mno-red-zone -mrdrnd -isystem "/home/jon/controlix-nuttx/nuttx/nuttx/include" -pipe -I "/home/jon/controlix-nuttx/nuttx/apps/include" -Dmain ping.c -o ping.home.jon.controlix-nuttx.nuttx.apps.system.ping.o
: error: expected identifier or โ€˜(โ€™ before numeric constant
: error: expected identifier or โ€˜(โ€™ before numeric constant
ping.c:221:5: note: in expansion of macro โ€˜mainโ€™
221 | int main(int argc, FAR char *argv[])
| ^~~~

EXAMPLES/NX FONT CACHING

  Description: The font caching logic in examples/nx is incomplete.  Fonts are
               added to the cache, but never removed.  When the cache is full
               it stops rendering.  This is not a problem for the examples/nx
               code because it uses so few fonts, but if the logic were
               leveraged for more general purposes, it would be a problem.

               Update: see examples/nxtext for some improved font cache handling.
               Update: The NXTERM font cache has been generalized and is now
               offered as the standard, common font cache for all applications.
               both the nx and nxtext examples should be modified to use this
               common font cache.  See interfaces defined in nxfonts.h.
  Status:      Open
  Priority:    Low.  This is not really a problem because examples/nx works
               fine with its bogus font caching.

Illegal calls to romdisk_register()

Several examples (and other things under apps/) make illegal calls to romdisk_register(). This both violates the portable POSIX OS interface and makes these applications un-usable in PROTECTED and KERNEL build modes.

Non-compliant examples include:

examples/bastest, examples/elf, examples/module,
examples/nxflat, examples/posix_spawn, examples/romfs,
examples/sotest, examples/thttpd, examples/unionfs

These examples are simple demos and, hence, you could argue that it is not so bad that they violate the interface for the purpose of demonstration (although they do set a bad example because of this).

These examples should, of course, use boardctl(BOARDIOC_ROMDISK) to create the ROM disk instead of calling romdisk_register() directly.

Illegal calls to romdisk_register()

Several examples (and other things under apps/) make illegal calls to romdisk_register(). This both violates the portable POSIX OS interface and makes these applications un-usable in PROTECTED and KERNEL build modes.

Non-compliant examples include:

  • examples/bastest, examples/elf, examples/module,
  • examples/nxflat, examples/posix_spawn, examples/romfs,
  • examples/sotest, examples/thttpd, examples/unionfs

These examples are simple demos and, hence, you could argue that it is not so bad that they violate the interface for the purpose of demonstration (although they do set a bad example because of this).

NETWORK WON'T STAY DOWN

  Description: If you enable the NSH network monitor (CONFIG_NSH_NETINIT_MONITOR)
               then the NSH 'ifdown' command is broken.  Doing 'nsh> ifconfig eth0'
               will, indeed, bring the network down.  However, the network monitor
               notices the change in the link status and will bring the network
               back up.  There needs to be some kind of interlock between
               cmd_ifdown() and the network monitor thread to prevent this.
  Status:      Open
  Priority:    Low, this is just a nuisance in most cases.

make should traverse all path subcomponents of CONFIGURED_APPS

I'm opening this issue since I tried to address some problem where an app was not being cleaned due to the current approach of detecting placeholder files not working (since it requires the placeholders to be present along the complete path to the app for it to work) in #397 but the problem requires a better solution.

To sum up, we can:

  • recurse every subdirectory in apps/: slow and wasteful, not really necessary (brute force approach)
  • recurse to directories containing placeholder files (such as .depend, etc.): this is prone to problems and as I mentioned fails in some cases
  • go directly into each app directory from top-level Makefile: does not work since we need to for example clean generated Kconfig files in intermediate directories leading to an app dir
  • preferred use CONFIGURED_APPS to build the list of all intermediate subdirectories we need to traverse

I'm trying the last approach but I couldn't get it fully to work. The first change is to have this in Make.defs:

CONFIGURED_SUBDIRS = $(sort $(foreach APP, $(CONFIGURED_APPS), $(CURDIR)$(DELIM)$(firstword $(subst /, ,$(subst $(CURDIR),,$(APP))))$(DELIM)))

This will take for example apps/examples/hello, apps/builtin, apps/wireless/bluetooth/btsak and, when standing on apps/ it will return examples, builtin, wireless. This works for the first level, but once you get into the second level, you should only consider apps for that subdirectory and this is where I'm not sure how to handle (eg: inside examples, do not consider the other apps to build the list of subdirectories).

STM32H7 does not have the a functioning Timer driver

Related to #834

I was trying to determine a way to use the timer with my NUCLEOH743ZI2 board. Following the guidelines provided in the above issue, I was still experiencing some problems. I did a deep dive into the what the ultimate cause of the problem was. This is as follows:

When navigating to nuttx -> arc -> arm -> src -> stm32 This folder contains a stm32_tim_lowerhalf.c file that defines the function stm32_timer_initialize which we need in order to get any timer up and operating. However in the stm32h7 folder found in the same location as the stm32 folder I noticed that the stm32_tim.h file defines it, but the stm32_tim.c file does not integrate it. Additionally, the stm32_tim_lowerhalf.c file does not exist.

Ultimately, this cause the startup.c file to fail on calling the stm32_timer_initialize function as it does not think that it exists. I am unsure how to go about using timers with the H7 board.

Any thoughts, or feedback would be great! Thank you for your time!

Illegal call to nxsched_foreach() in examples/thttpd

As noted by @gregory-nutt in the log message of commit # 3abdf30 the logic in examples/thttpd/content/tasks/tasks.c is calling OS internal function nxsched_foreach() which violates the POSIX OS interface.

This internal function is being called to generate a list of tasks for display in the webpage served by the web server example.

Although this is an example program, or perhaps more so because it is an example, we should not be teaching the wrong way to do things!

IFCONFIG AND MULTIPLE NETWORK INTERFACES

  Description: The ifconfig command will not behave correctly if an interface
               is provided and there are multiple interfaces.  It should only
               show status for the single interface on the command line; it will
               still show status for all interfaces.
  Status:      Open
  Priority:    Low

Byte Order, Single Thread - Pi Pico: USB Serial

Writing from a single character array in the USB serial example in a single thread causes the bytes to write out of order. Ex, define the string as:

static const char out_string[] = {0xAA, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 
                                    0x09, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 
                                    0x18, 0x19, 0x88, 0x89};

Then call the write for a single byte, the next nineteen bytes, and then the last two bytes:

write(outfd, out_string, 1);
write(outfd, out_string[1], 19);
write(outfd, out_string[20], 2);

The output across the USB channel using:
cat /dev/ttyACM0 | hexdump -e '22/1 "%02X ""\n"" "'

will be similar to:

AA 1F 04 20 EF 00 00 00 35 00 00 00 31 00 00 00 4D 75 01 02 5F 03
 *
AA 01 02 5F 03 AA 00 00 35 00 00 00 31 00 00 00 4D 75 01 02 5F 03
 AA 00 31 00 00 00 4D 75 01 02 5F 03 AA 02 5F 03 AA 1F 04 20 EF 00
 00 00 35 00 00 00 31 00 00 00 4D 75 01 02 5F 03 AA 1F 04 20 EF 00
 *
00 00 35 00 00 00 31 00 00 00 4D 75 01 02 5F 03 AA 00 00 31 00 00
 00 4D 75 01 02 5F 03 AA 1F 04 20 EF 00 00 00 35 00 00 00 31 00 00
 *
00 4D 75 01 02 5F 03 AA 4D 75 01 02 5F 03 AA 00 00 4D 75 01 02 5F
 03 AA 01 02 5F 03 AA 1F 04 20 EF 00 00 00 35 00 00 00 31 00 00 00
 4D 75 01 02 5F 03 AA 1F 04 20 EF 00 00 00 35 00 00 00 31 00 00 00
 *
4D 75 01 02 5F 03 AA 35 00 00 00 31 00 00 00 4D 75 01 02 5F 03 AA
 1F 04 20 EF 00 00 00 35 00 00 00 31 00 00 00 4D 75 01 02 5F 03 AA
 75 01 02 5F 03 AA 1F 04 20 EF 00 00 00 35 00 00 00 31 00 00 00 4D
 *

Whereas, a single write such as:
write(outfd, out_string, 22);

will produce the following using the same hexdump command as above:

AA 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 88 89
 *

apps/system USB Functional Partitioning

Several of the USB device helper applications in apps/system violate OS/application partitioning and will fail on a kernel or protected build. Many of these have been fixed by adding the BOARDIOC_USBDEV_CONTROL boardctl() command. But there are still issues.

These functions still call directly into operating system functions:

  • usbmsc_configure - Called from apps/system/usbmsc and apps/system/composite
  • usbmsc_bindlun - Called from apps/system/usbmsc
  • usbmsc_exportluns - Called from apps/system/usbmsc.

ILLEGAL CALLS TO romdisk_register()

  Description: Several examples (and other things under apps/) make illegal
               calls to romdisk_register().  This both violates the portable
               POSIX OS interface and makes these applications un-usable in
               PROTECTED and KERNEL build modes.

               Non-compliant examples include:

                 examples/bastest, examples/elf, examples/module,
                 examples/nxflat, examples/posix_spawn, examples/romfs,
                 examples/sotest, examples/thttpd, examples/unionfs

               These examples are simple demos and, hence, you could argue that
               it is not so bad that they violate the interface for the purpose
               of demonstration (although they do set a bad example because of
               this).

               These examples should, of course, use boardctl(BOARDIOC_ROMDISK)
               to create the ROM disk instead of calling romdisk_register()
               directly.
  Status:      Open
  Priority:    Medium.

EXAMPLES/NXTEXT ARTIFACTS

  Description: examples/nxtext.  Artifacts when the pop-up window is opened.
               There are some artifacts that appear in the upper left hand
               corner.  These seems to be related to window creation.  At
               tiny artifact would not be surprising (the initial window
               should like at (0,0) and be of size (1,1)), but sometimes
               the artifact is larger.
  Status:      Open
  Priority:    Medium.

UNVERIFIED THTTPD FEATURES

  Description: Not all THTTPD features/options have been verified.  In
               particular, there is no test case of a CGI program receiving
               POST input.  Only the configuration of apps/examples/thttpd
               has been tested.
  Status:      Open
  Priority:    Medium

EXAMPLES/SENDMAIL UNTESTED

  Description: examples/sendmail is untested on the target (it has been tested
               on the host, but not on the target).
  Status:      Open
  Priority:    Med

Compiling for the sim:nsh configuration fails

I followed the simple instructions for compiling the sim:nsh configuration (https://nuttx.apache.org/docs/latest/guides/simulator.html).
Near the end of the compilation, I get a compilation failure:

/home/koen/Documents/Projects/NuttX/sim/master/apps/nshlib/nsh_romfsetc.c:89: undefined reference to `romfs_img_len'
/usr/bin/ld: /home/koen/Documents/Projects/NuttX/sim/master/apps/nshlib/nsh_romfsetc.c:91: undefined reference to `romfs_img'

This is the piece of code where the references to romfs_img_len and romfs_img are made (CONFIG_NSH_CROMFSETC is not set in this configuration):

int nsh_romfsetc(void)
{
  int  ret;

#ifndef CONFIG_NSH_CROMFSETC
  struct boardioc_romdisk_s desc;

  /* Create a ROM disk for the /etc filesystem */

  desc.minor    = CONFIG_NSH_ROMFSDEVNO;     /* Minor device number of the RAM disk. */
  desc.nsectors = NSECTORS(romfs_img_len);   /* The number of sectors in the RAM disk */
  desc.sectsize = CONFIG_NSH_ROMFSSECTSIZE;  /* The size of one sector in bytes */
  desc.image    = romfs_img;                 /* File system image */

  ret = boardctl(BOARDIOC_ROMDISK, (uintptr_t)&desc);
  if (ret < 0)
    {
      ferr("ERROR: boardctl(BOARDIOC_ROMDISK) failed: %d\n", -ret);
      return ERROR;
    }
#endif

I got the code compiled by manually including the nsh_romfsimg.h header but that's not the proper solution of course.

The comments are confusing me as well. This is for a ROM disk, but the comments in the code speak of a RAM disk?

My feeling is that the nsh_romfsimg.h header should be included if CONFIG_NSH_CROMFSETC is not defined but I'm a complete newbie and I'm probably wrong in this (maybe the sim:nsh configuration itself is faulty?).

Illegal use of wdog timers in FTPC

netutils/ftpc/ftpc_connect.c uses internal OS wdog timer functions wd_start(), wd_cancel(), etc. This is aviolation of the portable POSIX OS interface. wd_start(0 is not an application accessible interface. It is only for use inside the OS.

The wdog interface functions cannot be called in PROTECTED or KERNEL build modes nor can they do the interrupt handling logic access user space. Remember that the callback is in the context of the timer interrupt handler.

The use of the internal OS wdog function should be replaced with user POSIX timer interface functions.

apps/system PARTITIONING

  Description: Several of the USB device helper applications in apps/system
               violate OS/application partitioning and will fail on a kernel
               or protected build.  Many of these have been fixed by adding
               the BOARDIOC_USBDEV_CONTROL boardctl() command.  But there are
               still issues.

               These functions still call directly into operating system
               functions:

                 - usbmsc_configure - Called from apps/system/usbmsc and
                   apps/system/composite
                 - usbmsc_bindlun - Called from apps/system/usbmsc
                 - usbmsc_exportluns - Called from apps/system/usbmsc.

  Status:      Open
  Priority:    Medium/High -- the kernel build configuration is not fully fielded
               yet.

nimble sim configuration is breaking CI beacuse of pointer-to-int-cast error

@v01d Looks like the nimble app is pointed at master not a commit or tag so it just started breaking builds like this:
I commented on the PR that caused this apache/mynewt-nimble#872
I'll open a PR to pin against the previous commit for now.

Configuration/Tool: sim/nimble
------------------------------------------------------------------------------------
  Cleaning...
  Configuring...
  Building NuttX...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   128    0   128    0     0    761      0 --:--:-- --:--:-- --:--:--   761

100 1514k    0 1514k    0     0  2435k      0 --:--:-- --:--:-- --:--:-- 2435k
/github/workspace/sources/apps/wireless/bluetooth/nimble/mynewt-nimble/porting/nimble/src/os_mbuf.c: In function 'os_mbuf_get':
Error: /github/workspace/sources/apps/wireless/bluetooth/nimble/mynewt-nimble/porting/nimble/src/os_mbuf.c:247:46: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  247 |     os_trace_api_u32x2(OS_TRACE_ID_MBUF_GET, (uint32_t)omp,
      |                                              ^
Error: /github/workspace/sources/apps/wireless/bluetooth/nimble/mynewt-nimble/porting/nimble/src/os_mbuf.c:268:48: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  268 |     os_trace_api_ret_u32(OS_TRACE_ID_MBUF_GET, (uint32_t)om);

tools/mksymtab.sh does not work properly in Windows MSYS

https://github.com/apache/incubator-nuttx-apps/blob/cb1b8e10db9fdf15e7dc1b4ccb5c2024d11a7713/tools/mksymtab.sh#L45

In tools/mksymtab.sh, the file permission is used to get the execlist from #271, but in MSYS environment, the file permission cannot be changed by chmod +x of Application.mk. As a result, symtab_apps.c cannot be generated correctly. In versions older than NuttX 9.1.0, there was no permission decision, so it worked as intended.

For example, if I delete -perm -a=x, it also works correctly in the MSYS environment, but I don't know if there are any side effects or not.

Anyone have a solution? or may I delete -perm -a=x?

EXAMPLES/PIPE ON CYGWIN

  Description: The redirection test (part of examples/pipe) terminates
               incorrectly on the Cygwin-based simulation platform (but works
               fine on the Linux-based simulation platform).
  Status:      Open
  Priority:    Low

NSH ifconfig and Multiple Network Interfaces

The ifconfig command will not behave correctly if an interface is provided and there are multiple interfaces. It should only show status for the single interface on the command line; it will still show status for all interfaces.

Modbus not usable with USB serial

Modbus can be used with USB serial, however, if the USB serial connection is lost, Modbus will hang in an infinite loop.

This is a problem in the handling of select() and read() and could probably resolved by studying the Modbus error handling.

A more USB-friendly solution would be to: (1) Re-connect and (2) re-open the serial drivers. That is what is done is NSH: When the serial USB device is removed, this terminates the session and NSH will then try to re-open the USB device. See the function nsh_waitusbready() in the file apps/nshlib/nsh_usbconsole.c. When the USB serial is reconnected the open() in the function will succeed and a new session will be started.

This is really an enhancement request: Modbus was never designed to work with removable serial devices.

mutliple PROGNAME not working correctly

An application Make.defs can define multiple builtin applications by using something like:

MAINCSRCS = a.c b.c
PROGNAME = a b

When building a.c the -Dmain=a_main will be defined, and similarly for b.c. However, the logic in Application.mk simply iterates PROGNAME in order to build each main definition. This assumes that all targets will be built. When only one of these is built (as part of a previous build), it will mismatch the corresponding program name (it will go in order from first PROGNAME entry).

The correct solution would be to find the index of the C file in MAINCSRCS and get the corresponding entry in PROGNAME. Make does not implement such a function and there's some trickery to do so: https://stackoverflow.com/questions/9674711/makefile-find-a-position-of-word-in-a-variable

As the Application.mk file is already really convoluted I don't want to keep making this worse.

Any better ideas?

This of course would be much easier if we just used the .c file name as PROGNAME but that would be a breaking change for apps using a different name.

apps/modbus/mb_m.c: missing eMBMasterASCIIStart definition

(This issue was reported by user @klmchp at incubator-nuttx repository)

Error message as shown below when enabled MB_ASCII_MASTER:
mb_m.c: In function 'eMBMasterInit':
mb_m.c:176:33: error: 'eMBMasterASCIIStart' undeclared (first use in this function); did you mean 'eMBMasterRTUStart'?
176 | pvMBMasterFrameStartCur = eMBMasterASCIIStart;
| ^~~~~~~~~~~~~~~~~~~
| eMBMasterRTUStart
mb_m.c:176:33: note: each undeclared identifier is reported only once for each function it appears in
mb_m.c:177:32: error: 'eMBMasterASCIIStop' undeclared (first use in this function); did you mean 'eMBMasterRTUStop'?
177 | pvMBMasterFrameStopCur = eMBMasterASCIIStop;
| ^~~~~~~~~~~~~~~~~~
| eMBMasterRTUStop
mb_m.c:178:32: error: 'eMBMasterASCIISend' undeclared (first use in this function); did you mean 'eMBMasterRTUSend'?
178 | peMBMasterFrameSendCur = eMBMasterASCIISend;
| ^~~~~~~~~~~~~~~~~~
| eMBMasterRTUSend
mb_m.c:179:35: error: 'eMBMasterASCIIReceive' undeclared (first use in this function); did you mean 'eMBMasterRTUReceive'?
179 | peMBMasterFrameReceiveCur = eMBMasterASCIIReceive;
| ^~~~~~~~~~~~~~~~~~~~~
| eMBMasterRTUReceive
mb_m.c:181:39: error: 'xMBMasterASCIIReceiveFSM' undeclared (first use in this function); did you mean 'xMBMasterRTUReceiveFSM'?
181 | pxMBMasterFrameCBByteReceived = xMBMasterASCIIReceiveFSM;
| ^~~~~~~~~~~~~~~~~~~~~~~~
| xMBMasterRTUReceiveFSM
mb_m.c:182:43: error: 'xMBMasterASCIITransmitFSM' undeclared (first use in this function); did you mean 'xMBMasterRTUTransmitFSM'?
182 | pxMBMasterFrameCBTransmitterEmpty = xMBMasterASCIITransmitFSM;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| xMBMasterRTUTransmitFSM
mb_m.c:183:38: error: 'xMBMasterASCIITimerT1SExpired' undeclared (first use in this function); did you mean 'xMBASCIITimerT1SExpired'?
183 | pxMBMasterPortCBTimerExpired = xMBMasterASCIITimerT1SExpired;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| xMBASCIITimerT1SExpired
mb_m.c:185:17: warning: implicit declaration of function 'eMBMasterASCIIInit'; did you mean 'eMBMasterTCPInit'? [-Wimplicit-function-declaration]
185 | eStatus = eMBMasterASCIIInit(ucPort, ulBaudRate, eParity);
| ^~~~~~~~~~~~~~~~~~
| eMBMasterTCPInit
mb_m.c: In function 'eMBMasterPoll':
mb_m.c:301:7: warning: enumeration value 'EV_MASTER_PROCESS_SUCCESS' not handled in switch [-Wswitch]
301 | switch (eEvent)
| ^~~~~~
mb_m.c:301:7: warning: enumeration value 'EV_MASTER_ERROR_RESPOND_TIMEOUT' not handled in switch [-Wswitch]
mb_m.c:301:7: warning: enumeration value 'EV_MASTER_ERROR_RECEIVE_DATA' not handled in switch [-Wswitch]
mb_m.c:301:7: warning: enumeration value 'EV_MASTER_ERROR_EXECUTE_FUNCTION' not handled in switch [-Wswitch]

apps/system/readline does not use buffered I/O

readline implementation does not use C-buffered I/O, but rather talks to serial driver directly via read(). It includes VT-100 specific editing commands. A more generic readline() should be implemented using termios' tcsetattr() to put the serial driver into a "raw" mode.

This will cause problems if you are using mixed C-buffered I/O with readline and fgetc, for example.

Cannot write to errno in all build modes

Problem: Currently, in user applications, the macro set_errno() should be used to access the errno variable. In the FLAT build mode this will work:

errno = errvalue;

But that will not work in the PROTECTED or KERNEL build modes. In those cases we must do:

set_errno(errvalue);

From apps/ PR #226 discussion:

@patacongo

Have you tried this in protected and/or kernel build modes. There might be problems when writing to the errno in those cases since the errno resides in the TCB which is not accessible. In those modes set_errno() is a function call that goes through a syscall and errno is defined to be get_errno() which will only support read access.

So reading the errno in the modes is okay, but writing must explicitly use set_errno(). That does break the standard but I am open to other technical solutions.

@xiaoxiang781216

Yes, you are right. userspace can't access TCB directly in protected/kernel build.

What I can imagine:
1.Move errno to userspace(e.g. at the begining of thread stack)
2.Overwrite assignment operatior(but require C++)

@patacongo

What I can imagine:
1.Move errno to userspace(e.g. at the begining of thread stack)

Except how would you find the beginning of the thread stack in user space?

This is how TLS works. TLS aligns the stack and then, by masking the current stack pointer, you can get the address of the base of the current stack. However, this does not work in FLAT or PROTECTED modes. That is because the size of that mask also effects the maximum size of the stack. For example, if I use the a 4Kb mask 0x00000fff, then the maximum stack size would be 4Kb which is not big enough. Large stack alignments effect memory usage on platforms with minimal RAM resources.

So TLS can only really be used in the KERNEL build mode which has highly aligned virtual stacks.

In KERNEL mode, we could even do things as GLIBC does: errno is just a global variable in the process address space. It is unique to process, but not to a thread.

We could do something like this by moving many of the user wrapper functions from the sched/ to libs/libc. For example: nxsem_wait() and sem_wait() are both in sched/semaphore/sem_wait.c. We could mov sem_wait to libs/libc/sempahores/lib_semwait.c. If we did that for EVERY OS interface, then the errno could be handled completely in user space and could be moved out of the TCB.

!!! No that would not work because sem_wait() is also a cancellation point which would not work in user space in its current form.

2.Overwrite assignment operatior(but require C++)

Or use the non-standard set_errno();

@patacongo

I looked at how GLIBC handles errno. It uses TLS. Here is a general overview:

glibc's errno.h has multiple definitions of errno.h but if nothing is defined, it includes stdlib/errno.h and stdlib/errno.h has this:

/* The error code set by various library functions.  */
extern int *__errno_location (void) __THROW __attribute_const__;
# define errno (*__errno_location ())

There are various implementations of __errno_location(). Most default to this:

#include <errno.h>
#include <tls.h>

int *
__errno_location (void)
{
  return &errno;
}
libc_hidden_def (__errno_location)

Where errno is then defined (errno.h) as a thread-specific integer:

extern __thread int errno attribute_tls_model_ie;

@patacongo

I think that we could implement a different kind of TLS that does not require aligned stacks. We could so a system call to get the stack bas address. There is already a pthread_get_stackaddr_np(), we could generalize that more and use it to get the base of the stack and then provide an alternative implementation of TLS that used the non-aligned stack base.

That would not be too difficult. However, it is still inefficient since we would have to do a system call to get the stack base address. With traditional TLS, we only have to mask the stack pointer address and that can all be done in user space.

Is preconfig necessary for application directories?

This is somewhat related to some of the issues pointed out here: apache/nuttx#1407

Most of the configuration phase output is coming from running the preconfig target inside all the application directories.
(By application directories I'm referring to the lowest level, for instance: apps/examples/adc)
That target is inherited from Application.mk and applications and examples could then extend it.
As of right now, none of the applications present in the repo use that target. I also looked for some examples in other repositories but I couldn't find any.

The addition came as part of a9aa753 which added the dynamic top-level Kconfig generation.
This prepares the top-level Kconfig files, at the level of application directory there is no more preparation. So I'm wondering if someone is using this for any other purpose? If so, shouldn't that be part of context?

Removing this part will significantly reduce configuration time and also provides a cleaner output.
I have the following patch:

diff --git a/Application.mk b/Application.mk
index d23492eb..9549f7ac 100644
--- a/Application.mk
+++ b/Application.mk
@@ -96,7 +96,7 @@ VPATH += :.
 # Targets follow

 all:: .built
-.PHONY: clean preconfig depend distclean
+.PHONY: clean depend distclean
 .PRECIOUS: $(BIN)

 define ELFASSEMBLE
@@ -195,8 +195,6 @@ install::

 endif # BUILD_MODULE

-preconfig::
-
 ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
 ifneq ($(PROGNAME),)
 ifneq ($(PRIORITY),)
diff --git a/Directory.mk b/Directory.mk
index 66fbbdab..e04b414e 100644
--- a/Directory.mk
+++ b/Directory.mk
@@ -43,7 +43,6 @@ all: nothing

 .PHONY: nothing context depend clean distclean

-$(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),preconfig)))
 $(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),context)))
 $(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),depend)))
 $(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),clean)))
@@ -53,7 +52,7 @@ nothing:

 install:

-preconfig: $(foreach SDIR, $(SUBDIRS), $(SDIR)_preconfig)
+preconfig:
 ifneq ($(MENUDESC),)
        $(Q) $(MKKCONFIG) -m $(MENUDESC)
 endif
diff --git a/Make.defs b/Make.defs
index 92cae86a..e132c20e 100644
--- a/Make.defs
+++ b/Make.defs
@@ -50,11 +50,15 @@ endif
 # Application Directories

 # BUILDIRS is the list of top-level directories containing Make.defs files
+# CONFDIRS is the list of directories where the preconfig target will
+#   execute in.
 # CLEANDIRS is the list of all top-level directories containing Makefiles.
 #   It is used only for cleaning.

 BUILDIRS  := $(dir $(wildcard $(APPDIR)$(DELIM)*$(DELIM)Make.defs))
 BUILDIRS  := $(filter-out $(APPDIR)$(DELIM)import$(DELIM),$(BUILDIRS))
+CONFDIRS  := $(filter-out $(APPDIR)$(DELIM)builtin$(DELIM),$(BUILDIRS))
+CONFDIRS  := $(filter-out $(dir $(wildcard $(APPDIR)$(DELIM)*$(DELIM)Kconfig)),$(CONFDIRS))
 CLEANDIRS := $(dir $(wildcard $(APPDIR)$(DELIM)*$(DELIM)Makefile))

 # CONFIGURED_APPS is the application directories that should be built in
diff --git a/Makefile b/Makefile
index 91ef3a91..dff648bc 100644
--- a/Makefile
+++ b/Makefile
@@ -149,7 +149,7 @@ context_serialize:
 context: context_serialize

 Kconfig:
-   $(foreach SDIR, $(BUILDIRS), $(call MAKE_template,$(SDIR),preconfig))
+ $(foreach SDIR, $(CONFDIRS), $(call MAKE_template,$(SDIR),preconfig))
        $(Q) $(MKKCONFIG)

 preconfig: Kconfig

Trying to run the Timer example

Hello! I am trying to run the timer example following the steps provided here: https://nuttx.apache.org/docs/latest/components/drivers/character/timer.html

The few things that I do that I do not see in the steps, is also selecting a peripheral timer, from the STM32 peripheral tag.

I get the error Failed to open /dev/timer0: 2 when running the example. A quick ls of the /dev shows the following:

console
 null
 ttyS0

Why isnt /dev/timer0 part of this list.

++ I am using a Nucleo-H743ZI2 board with pretty much nothing else running other than the simple timer example. From the link provided i followed the second set of steps via the menuconfig

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.