works with FPU=no
This commit is contained in:
parent
7cac0e4b08
commit
acf699ad9f
|
@ -28,6 +28,8 @@
|
||||||
#ifndef _CHCONF_H_
|
#ifndef _CHCONF_H_
|
||||||
#define _CHCONF_H_
|
#define _CHCONF_H_
|
||||||
|
|
||||||
|
#define CHPRINTF_USE_FLOAT TRUE
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/**
|
/**
|
||||||
* @name System timers settings
|
* @name System timers settings
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
st-link_cli -c SWD ur -P build\ch.hex -Rst -Run
|
|
@ -45,6 +45,10 @@ static void cmd_mem(BaseSequentialStream *chp, int argc, char *argv[]) {
|
||||||
chprintf(chp, "heap free total : %u bytes\r\n", size);
|
chprintf(chp, "heap free total : %u bytes\r\n", size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void cmd_log(BaseSequentialStream *chp, int argc, char *argv[]) {
|
||||||
|
chprintf(chp, "log(18000)=%f\r\n", logf(18000));
|
||||||
|
}
|
||||||
|
|
||||||
static void cmd_threads(BaseSequentialStream *chp, int argc, char *argv[]) {
|
static void cmd_threads(BaseSequentialStream *chp, int argc, char *argv[]) {
|
||||||
static const char *states[] = {CH_STATE_NAMES};
|
static const char *states[] = {CH_STATE_NAMES};
|
||||||
thread_t *tp;
|
thread_t *tp;
|
||||||
|
@ -83,6 +87,7 @@ static void cmd_test(BaseSequentialStream *chp, int argc, char *argv[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static const ShellCommand commands[] = {
|
static const ShellCommand commands[] = {
|
||||||
|
{"log", cmd_log},
|
||||||
{"mem", cmd_mem},
|
{"mem", cmd_mem},
|
||||||
{"threads", cmd_threads},
|
{"threads", cmd_threads},
|
||||||
{"test", cmd_test},
|
{"test", cmd_test},
|
||||||
|
|
Loading…
Reference in New Issue