Giter Club home page Giter Club logo

px-fwlib's People

Contributors

pieterconradie avatar wihan 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

px-fwlib's Issues

Running cli_explorer on ATMEL Xplained XMINI -328p

Howdy! :)

Seems to be just a little fudge off if the serial port timing if you attempt to run the Arduino cli explorer program on ATMEL's cheap debug board. I toot a look at the F_CPU values, and double uart speed setting and they seem compatible. I bet it's something simple.

image

Thanks!

Bug in px_log_fs

Greetings,

Basically I think I've identified a bug in px-log, when the log rolls round having filled all available sectors it erases the wrong sector, starts writing in that sector, and when it fills, logs a trace that the log is corrupt. I have verified that I am writing to the correct addresses in my memory device. I am using only 3 sectors, which is a bit small I suppose, but it makes for easier debugging. .

Target is ATMEGA2560.

The guts of px_log_fs_cfg.h is below:
#define PX_LOG_FS_CFG_PAGE_SIZE 256
#define PX_LOG_FS_CFG_ERASE_BLOCK_SIZE 16
#define PX_LOG_FS_CFG_REC_DATA_SIZE 6
#define PX_LOG_FS_CFG_STOP_WR_WHEN_FULL 0

init:
const px_log_fs_err_t rc = px_log_fs_init(&f_px_log_fs_handle, 0, 3 * PX_LOG_FS_CFG_ERASE_BLOCK_SIZE - 1);

write:
const px_log_fs_err_t rc = px_log_fs_wr(&f_px_log_fs_handle, rec, sizeof(driver_speed_log_record_t));

This is what happens:

log after init on an erased memory:
Page start: 0x0000
Page end: 0x002F
Page size: 256
Record size: 8
Record data size: 6
Records per page: 31
First page: 65535
Last page: 65535
Write p: 0x0000, 0x0004
Read p: 0x0000, 0x0000

		0      1      2      3      4      5      6      7      8      9      A      B      C      D      E      F      

0x0000: x      x      x      x      x      x      x      x      x      x      x      x      x      x      x      x      
0x0010: x      x      x      x      x      x      x      x      x      x      x      x      x      x      x      x      
0x0020: x      x      x      x      x      x      x      x      x      x      x      x      x      x      x      x      

log after filling memory with records:
Page start: 0x0000
Page end: 0x002F
Page size: 256
Record size: 8
Record data size: 6
Records per page: 31
First page: 0
Last page: 47
Write p: 0x0000, 0x0004
Read p: 0x0000, 0x0000

		0      1      2      3      4      5      6      7      8      9      A      B      C      D      E      F      

0x0000: U 0000 U 0001 U 0002 U 0003 U 0004 U 0005 U 0006 U 0007 U 0008 U 0009 U 000a U 000b U 000c U 000d U 000e U 000f 
0x0010: U 0010 U 0011 U 0012 U 0013 U 0014 U 0015 U 0016 U 0017 U 0018 U 0019 U 001a U 001b U 001c U 001d U 001e U 001f 
0x0020: U 0020 U 0021 U 0022 U 0023 U 0024 U 0025 U 0026 U 0027 U 0028 U 0029 U 002a U 002b U 002c U 002d U 002e U 002f 

log after writing one more record:
Page start: 0x0000
Page end: 0x002F
Page size: 256
Record size: 8
Record data size: 6
Records per page: 31
First page: 0
Last page: 16
Write p: 0x0010, 0x000C
Read p: 0x0000, 0x0000

		0      1      2      3      4      5      6      7      8      9      A      B      C      D      E      F      

0x0000: U 0000 U 0001 U 0002 U 0003 U 0004 U 0005 U 0006 U 0007 U 0008 U 0009 U 000a U 000b U 000c U 000d U 000e U 000f 
0x0010: U 0030 x      x      x      x      x      x      x      x      x      x      x      x      x      x      x      
0x0020: U 0020 U 0021 U 0022 U 0023 U 0024 U 0025 U 0026 U 0027 U 0028 U 0029 U 002a U 002b U 002c U 002d U 002e U 002f 

After writing reet of sector plus ONE more record:
TRACE: 10,707: ERROR: File system must be corrupt (line no. in log-fs.c)

Feature request: CLI groups that are also commands

Hi, I came across your firmware library for the command line interface. It looks quite interesting and well coded.

One question has come to mind as I have pondered the implementation. Is there a way to interpret a command group as a command ?

Using your led [on | off] example, please let me explain. You have a "group" called "led" and two "commands" which are "on" and "off". What if the "led" group can have a third calling style that is the command "led"? For instance, you type "led" with no arguments and you want the cli to interpret this as a command to display the current state of the led. So,

"led on" - turns the led on
"led off" - turns the led off
"led" - displays the current state of the led

Is this functionality with the CLI library currently possible?

TAB completion causes px_cli.c code to hang

If you incorrectly type the second parameter and then press TAB the code gets stuck in an infinite loop. For example in the demo code on the PX-HER0 type

spi g

Adding a return false after line 551 in px_cli.c seems to fix this for me but I'm not sure this is the perfect answer

550 // Go back to start of list
551 px_cli_cmd_item_get_first();
552 return false

Great library BTW
Thanks

pwm output

Neat app!

I think a cool addition would be a command that behaved like the analogwrite function in Arduino.

Can pix_log be used with configuration file ?

Hello,

I have some trouble finding appropriate filesystem with my NOR flash with embedded stm32 device. The external flash has a large erase sectors flash (128K).

I thought about various options (I have large RAM), but not yet sure what is best.
I found this great filesystem, but I think we also have configuration file.
Can it be used with configuration file ? If not, do you have any suggestion for this problem ?

Thank you very much!
Ran

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.