2011-03-06 15:39:02 +00:00
|
|
|
|
2011-03-26 01:04:10 +00:00
|
|
|
VSN Board Support Package, for the NuttX, Uros Platise <uros.platise@isotel.eu>
|
|
|
|
===============================================================================
|
|
|
|
http://www.netClamps.com
|
|
|
|
|
2014-04-13 16:22:22 -06:00
|
|
|
The directory contains start-up and board level functions.
|
2011-03-06 15:39:02 +00:00
|
|
|
Execution starts in the following order:
|
|
|
|
|
|
|
|
- sysclock, immediately after reset stm32_rcc calls external
|
|
|
|
clock configuration when
|
|
|
|
CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=y
|
|
|
|
is set. It must be set for the VSN board.
|
2014-04-13 16:22:22 -06:00
|
|
|
|
2011-03-06 15:39:02 +00:00
|
|
|
- boot, performs initial chip and board initialization
|
2013-01-15 21:01:37 +00:00
|
|
|
- sched/os_bringup.c then calls user entry defined in the .config file.
|
2011-03-26 01:04:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
Naming throughout the code
|
|
|
|
==========================
|
|
|
|
|
|
|
|
- _init(): used to be called once only, after powerup, to perform board
|
|
|
|
initialization
|
2014-04-13 16:22:22 -06:00
|
|
|
- _start() or called via FS _open(): starts peripheral power, puts it
|
2011-03-26 01:04:10 +00:00
|
|
|
into operation
|
|
|
|
- _stop() or called via FS _close(): opposite to _start()
|
2014-04-13 16:22:22 -06:00
|
|
|
|
2011-03-26 01:04:10 +00:00
|
|
|
|
|
|
|
System notifications (a sort of run-levels)
|
|
|
|
===========================================
|
|
|
|
|
|
|
|
On the VSN, NSH represents the core application as it supports scripts
|
2014-04-13 16:22:22 -06:00
|
|
|
easily adaptable for any custom application configuration. NSH is
|
2011-03-26 01:04:10 +00:00
|
|
|
invoked as follows (argument runs a script from the /etc/init.d directory):
|
|
|
|
|
|
|
|
- nsh init: on system powerup called by the NuttX APP_START
|
|
|
|
|
2014-04-13 16:22:22 -06:00
|
|
|
TODOs:
|
|
|
|
|
2011-03-26 01:04:10 +00:00
|
|
|
- nsh xpowerup: run on external power used to:
|
|
|
|
- try to setup an USB serial connection
|
|
|
|
- configure SLIP mode, internet
|
|
|
|
- start other internet services, such as telnetd, ftpd, httpd
|
2014-04-13 16:22:22 -06:00
|
|
|
|
2011-03-26 01:04:10 +00:00
|
|
|
- nsh xpowerdown: run whenever USB recevied suspend signal or
|
|
|
|
external power has been removed.
|
|
|
|
- used to stop internet services
|
2014-04-13 16:22:22 -06:00
|
|
|
|
2011-03-26 01:04:10 +00:00
|
|
|
- nsh batdown: whenever battery is completely discharged
|
|
|
|
|
2014-04-13 16:22:22 -06:00
|
|
|
|
2011-03-26 01:04:10 +00:00
|
|
|
Compile notes
|
|
|
|
===============================
|
|
|
|
|
|
|
|
To link-in the sif_main() utility do, in this folder:
|
|
|
|
- make context TOPDIR=<path to nuttx top dir>
|
2014-04-13 16:22:22 -06:00
|
|
|
|
2012-12-23 20:22:41 +00:00
|
|
|
This will result in registering the application into the builtin application
|
|
|
|
registry.
|