Commit graph

34 commits

Author SHA1 Message Date
TT 56b0d3ad8a env: insert wait after switching to dfu 2020-05-14 07:20:29 +09:00
TT c40d78d80f env: clean Makefile 2020-03-08 20:03:54 +09:00
DiSlord cb587d05a4 Makefile:
Remove compile
 #include $(CHIBIOS)/test/rt/test.mk
 #include $(CHIBIOS)/os/various/shell/shell.mk

Shell not used, test not used
2020-02-27 22:11:32 +03:00
DiSlord b7934745ca Restore main thread stack size (stack usage code optimization give good result)
Decrease sweep thread stack size from 640 to 512 (also stack usage code optimization give good result)
Little change 16x22 font

ui.c
Use definition for some hard coded values
Fix button "Correction" not reset after use "reset"
Define menu button and input num size

#define MENU_BUTTON_WIDTH  60
#define MENU_BUTTON_HEIGHT 30
#define NUM_INPUT_HEIGHT   30

Reduce button height from 32 to 30 pixels (fix in stimulus menu "<back" button overwrite by input num field)
Little code change
2020-02-26 23:30:50 +03:00
DiSlord d2431f0cdc Increase screen render (in some cases up to 2x speedup), decrease stack usage (code size less on 1500 bytes)
Write simple profiling definitions
 START_PROFILE
 STOP_PROFILE
Use it for detect sys tick amount and output to screen

main.c
 Reduce VNA_SHELL_MAX_LENGTH to 48, and made shell_line as static (reduce stack usage)
 Remove BaseSequentialStream *chp from command calls (use static shell_stream), it reduce code size and stack usage
 Use VNA_SHELL_FUNCTION definition for all commands
 Remove chMtxLock(&mutex);chMtxUnlock(&mutex); from commands, and define command flag for use it in calls
 Apply default scale from trace_info on trace change
 Led blink outside from main sweep cycle (better look, and less noise)
 Some size fixes

chprintf.c
 Implement small memory stream object, only put function and plot_printf(char *str, int size, const char *fmt, ...)
 Use it in all code (little increase speed, and huge decrease size)

 Restore USE_EXCEPTIONS_STACKSIZE = 0x180 (possible not need, but not good tested)

plot.c
 Made huge screen render profile (add some comments)
 Not use cell clipping on draw cell data (use constants increase speed, decrease stack usage (not need put it to stack))
 Clip cell if need only on screen flush
 Use new plot_printf, remove chsnprintf usage

Apply code style
============================================================================================================
Interesting fact
Usage memset(spi_buffer, DEFAULT_BG_COLOR, (h*CELLWIDTH)*sizeof(uint16_t)); dramatically decrease render speed
possibly it fill buffer by 8 bit data, so slow
Usage
  uint32_t *p = (uint32_t *)spi_buffer;
  while (count--) {
    p[0] = DEFAULT_BG_COLOR|(DEFAULT_BG_COLOR<<16);
    p[1] = DEFAULT_BG_COLOR|(DEFAULT_BG_COLOR<<16);
    p[2] = DEFAULT_BG_COLOR|(DEFAULT_BG_COLOR<<16);
    p[3] = DEFAULT_BG_COLOR|(DEFAULT_BG_COLOR<<16);
    p+=4;
  }
gives x10 speed perfomance

Draw polar and smit grid very slow (but i don`t know how increase it except use bitmaps, but it need about 5-8k flash size and file prepare)
On long lines render slow down, but clipping use more calculation, and not give good result
Need made stack usage check
2020-02-24 22:47:52 +03:00
DiSlord 1177d87498 Increase main thread stack size (if used as shell, if run some commands get stack limit, example "trace 0 x" command)
Decrease interrupt stack size

Use __ROR instruction in flash.c for checksum rotate
Fix erase background for frequencies string in plot.c

Implement getStringIndex function for parse string arguments, now Usage show correct information about used arg, and more easy use strings definitions
Example:
 Need check if string "on"  in avaible arguments list "load|open|short|thru|isoln|done|on|off|reset|data|in"
 getStringIndex("on", "load|open|short|thru|isoln|done|on|off|reset|data|in") return 6
 If not found return -1
Not need use if (strcmp() == ...) else ....
This usage save some amount of size
2020-02-23 15:45:37 +03:00
TT 7adba06333 chore: reduce foot-print of numfont20x24 2019-10-21 20:25:44 +09:00
TT 512d3c9523 feat: reduce flash size by preventing inline function 2019-10-18 00:50:00 +09:00
TT a9c197f1f5 env: ignore error on switching to dfu mode 2019-09-28 13:07:08 +09:00
TT ec8c53bde3 add target dfu in Makefile 2019-09-07 09:08:43 +09:00
cho45 480ad0f745 static inline reduce stack memory usage 2019-08-29 01:05:55 +09:00
TT f2ab569e5a
Merge pull request #18 from cho45/newlib-nano
use newlib-nano to saving sram usage of impure_data
2019-08-25 23:12:51 +09:00
TT df811616df make: add target flash 2019-08-25 23:08:42 +09:00
cho45 3d8e4796de use newlib-nano to saving sram usage of impure_data 2019-08-24 20:27:16 +09:00
TT 00753abe91 ci: remove CIRCLE_TAG from build job 2019-08-24 11:30:52 +09:00
TT ddecd7f4a9 chore: omit unused source file 2019-08-18 09:34:34 +09:00
TT 53d07e8c12 feat: add version command 2019-08-18 08:19:17 +09:00
TT 10bbe7dc82 re-enable dump command 2017-01-22 13:34:01 +09:00
TT 6d2941bd51 omit unused chibios features from chconf.h 2017-01-22 13:07:49 +09:00
TT d3c40fbd11 add TAGS rule in Makefile 2017-01-14 14:32:28 +09:00
TT 9f0abd70d3 import ChibiOS as submodule 2017-01-14 10:05:08 +09:00
TT 8038df8c66 change adc driver not to use chibios hal 2016-12-17 13:16:56 +09:00
TT 9c3296ad0d resistitive touch work in progress. add adc and gpt 2016-12-07 03:34:33 +09:00
TT 3323e116a3 remove dependency from CMSIS dsplib 2016-12-03 15:54:49 +09:00
TT d84a212a3b add channel menu, narrow and ensure selection, reverse marker moving direction 2016-12-01 01:08:13 +09:00
TT 25dd4bf182 add grid control, etc 2016-11-28 09:17:54 +09:00
TT ea8b4d71c2 fix name ili9431 to ili9341 2016-11-05 11:52:50 +09:00
TT bc6ce2963c add some comments, order code 2016-11-02 21:08:33 +09:00
TT 00a4b70bf7 split code into plot.c 2016-10-28 20:50:51 +09:00
TT 17188a0418 shrink stack size, add marker info temporally 2016-10-27 19:25:50 +09:00
TT 0fe058aca7 add save/recall feature 2016-10-16 20:02:38 +09:00
TT 602df8af7a add spi lcd ili9341 in development 2016-09-27 00:06:00 +09:00
TT 10b2cb7702 add dsp.c (hilbert, iir) 2016-09-18 10:11:41 +09:00
TT 59020b8cfc initial commit 2016-09-05 07:29:43 +09:00