Skip to content

Added support for LibreTiny IoT chips #317

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Phil1pp
Copy link
Contributor

@Phil1pp Phil1pp commented May 14, 2025

github.com/libretiny-eu/libretiny

Tested with CBU chip over WIFI

[env:BK7231N_ip]
platform = libretiny
board = cbu
framework = arduino
build_flags =
  -DMASK_VERSION=0x57B0
  -DSMALL_GROUPOBJECT
  -DKNX_NO_SPI
  -DKNX_FLASH_OFFSET=0x1DB000

@Phil1pp
Copy link
Contributor Author

Phil1pp commented May 14, 2025

I don't understand why linking fails even though randomSeed is defined here:
wiring_math.cpp

@thewhobox
Copy link
Contributor

Mabye millis() is unsigned long but the function needs uint32_t.
Because there ist no function with parameter seed as unsigned long it cant link it.

If i make these changes in line 61 it works:

uint32_t seed = millis();
randomSeed(seed);

@Phil1pp
Copy link
Contributor Author

Phil1pp commented May 15, 2025

Are you sure that this change should work?
I wasn't able to compile it locally and also online it failed.

I only got it to compile by adding this:

#if defined(LIBRETINY)
#include "wiring_math.cpp"
#endif

@thewhobox
Copy link
Contributor

Strange. I tested it locally.

https://github.com/libretiny-eu/libretiny

Tested with v1.8.0 on a BK7231N and the following build flags:
  -DMASK_VERSION=0x57B0
  -DKNX_NO_SPI
  -DKNX_FLASH_OFFSET=0x1DB000
@Phil1pp
Copy link
Contributor Author

Phil1pp commented May 20, 2025

I replaced randomSeed with srandom and now it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants