Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TODOs and Ideas #148

Closed
8 of 28 tasks
salkinium opened this issue Jan 18, 2019 · 16 comments
Closed
8 of 28 tasks

TODOs and Ideas #148

salkinium opened this issue Jan 18, 2019 · 16 comments

Comments

@salkinium
Copy link
Member

salkinium commented Jan 18, 2019

Some rough ideas about what needs to be done without having to open an individual issue for each one of them. Please feel free to comment or add more features.

Library

Build

  • More flexible git info for any repository.
@asmfreak
Copy link
Contributor

I saw some time ago discussion on code formatting.
I saw this tool on C++ Weekly, enabling one to choose and save clang-format configuration.
I'm not sure, if we'll be able to make great use out of it, since a lot of modm code is Jinja templates, unparseable by clang.

@parzival2
Copy link

Any plans to add USB support?

@salkinium
Copy link
Member Author

Any plans to add USB support?

Yes, preferrably via third-party project integration though, since doing USB properly seems fairly complicated. I've bookmarked these projects to evaluate:

@parzival2
Copy link

@salkinium Great. If I get around to gain a bit of knowledge into the project, may be I can create a pull-request using any of the above mentioned sources. I just discovered modm yesterday and its great.

@parzival2
Copy link

parzival2 commented Mar 12, 2020

I saw that ROS is already available but having nanopb(https://github.com/nanopb/nanopb) will also be really great. It will be useful in writing binary files to SD-Card. The idea that I had in mind was to collect Accelerometer, Gyroscope data and play them back to simulate sensors like ROS bags. What do you guys think?

@salkinium
Copy link
Member Author

salkinium commented Mar 12, 2020

What do you guys think?

You don't have to integrate nanopb into modm directly (in fact I would prefer to keep the modm core repo not expanding in size too much). You could make it a separate lbuild repository (like https://github.com/modm-io/Invensense-eMD) or modify the generated SCons/CMake build system to also build nanopb. The goal is to not have to "wrap" every library with modm, as modm probably adds very little to those libraries.

It will be useful in writing binary files to SD-Card

Note that our version of FatFS is very old, it should must be upgraded. In addition there isn't that much explicit support for SD-Cards or filesystems in general in modm. (sorry)

@salkinium
Copy link
Member Author

Oh, nanopb comes with both CMake and SCons tools, so maybe it is warranted to create a proper lbuild repository and integrate not only the source but also the protocol builder into the modm build system. Probably not trivial though.

@W-M-D
Copy link

W-M-D commented Mar 18, 2020

Implementing some SD support soon!

@rleh
Copy link
Member

rleh commented Mar 18, 2020

Implementing some SD support soon!

Once I added a block device interface (and implementations for SPI flash, heap storage and mirroring (like RAID1) to modm: https://docs.modm.io/develop/api/stm32g474vet7/classmodm_1_1BlockDevice.html
The idea was to use this interface also for SD cards, on-chip flash and other storage devices.

Then file systems like FAT (or ext3) could be implemented via this interface and used for all storage.

Unfortunately this interface has not been used for the recently added Eeprom driver in #321.

@mikewolfram
Copy link
Contributor

I wasn't aware of the BlockDevice, so I did the CAT24AAxx driver by simply modifying the existing EEPROM driver. I'll look into it and change it.

@mikewolfram
Copy link
Contributor

Talking about upcoming implementations, I'm interested in DMA and UI. I've been looking in lvgl but wasn't able to get it up and running. Their memory management didn't work on my L431. And also it adds a lot of code, my test of having a simple button added >30k (with -Og setting). I'd rather use something else. The current UI in modm has small footprint and would work perfectly to my needs.

@rleh
Copy link
Member

rleh commented Mar 18, 2020

DMA

You know there currently exists a very basic and hardly used DMA API?

@chris-durand and me started to work on DMA two years ago. On my feature/dmahal branch are a lot of WIP-commits. I'll try to rebase the branch soon.

DMA can be used for many different use cases. What is your use case?
Maybe we could discuss the use-cases and thus the interface of the DMA API(s) in a separate issue?

@salkinium
Copy link
Member Author

salkinium commented Mar 18, 2020

I'm interested in DMA

Meme

Maybe we could discuss the use-cases and thus the interface of the DMA API(s) in a separate issue?

Yes please. I've added a bunch of DMA data already to the device files for this purpose!

@rleh
Copy link
Member

rleh commented Mar 18, 2020

For DMA: see #358

@ghost
Copy link

ghost commented May 26, 2020

Better sanity checks. After some quick testing i encountered type mismatches across units. Too many warnings is disabled after my taste, which can lead to undefined behaviour. Tools as clang-tidy and cppcheck can be used on the generated code.

Example of code smells:

platform/fault/fault_storage.cpp:36:17: note: type 'const uint32_t' should match type 'const uint8_t'
36 | const uint32_t *fault_storage_heap_start{nullptr};

platform/core/heap_table.cpp:22:27: warning: type 'struct table_pool_t' violates the C++ One Definition Rule [-Wodr]
22 | } attribute((packed)) table_pool_t;

platform/fault/fault_storage.cpp:18:17: note: a field of same name but different type is defined in another translation unit
18 | uint32_t const traits;

@salkinium
Copy link
Member Author

I completely agree! This only works if it is automated in the CI though. Would you be interested in setting this up (or adding more warnings)?

@modm-io modm-io locked and limited conversation to collaborators Sep 29, 2021
@salkinium salkinium unpinned this issue Sep 29, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Development

No branches or pull requests

6 participants