Skip to content
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

Update libify to support IDF export with symlinks #770

Merged
merged 5 commits into from
Feb 5, 2024

Conversation

balazsracz
Copy link
Collaborator

@balazsracz balazsracz commented Feb 2, 2024

Adds two features to libify.sh:

  • adds support for creating or updating an OpenMRNIDF repository. This means skipping arduino-specific stuff, like examples or OpenMRNLite.h, rpelacing the readme.md and library.properties files with a different one.
  • Adds support for creating relative symlinks. This allows using OpenMRNIDF that links back to openmrn using relative symlinks -- these can be checked into git for example.
  • Adds the few toplevel files for OpenMRNIDF like cmakefile

copy_file . arduino/{library.json,library.properties,keywords.txt,README.md,LICENSE,CONTRIBUTING.md}
copy_dir . arduino/examples
if [ "x$TARGET_IDF" == "x" ]; then
copy_file . arduino/{library.json,library.properties,keywords.txt,README.md,LICENSE,CONTRIBUTING.md}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should probably have README.md,LICENSE,CONTRIBUTING.md on the IDF side, perhaps a slightly different version though.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't add contributing.md because you don't have it, and the arduino version references the OpenMRNLite library in the text. So we'd need to first write a new one, but this is really not high priority now.

echo '(options must come after the path specification)'
echo '-f will erase the target library before exporting.'
echo '-l will create symlinks instead of copying files.'
echo '-i will create OpenMRNIDF repository instead of arduino.'
echo '-r will create relative symlinks. OPenMRNPath has to be a relative path from the library export directoty back to openmrn, starting with ../'
Copy link
Collaborator

@atanisoft atanisoft Feb 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OPenMRNPath -> OpenMRNPath
directoty -> directory

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

if [ "x$TARGET_IDF" == "x" ]; then
copy_file . arduino/{library.json,library.properties,keywords.txt,README.md,LICENSE,CONTRIBUTING.md}
copy_dir . arduino/examples
fi

copy_file src arduino/OpenMRNLite.{h,cpp} arduino/CDIXMLGenerator.hxx \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we consider moving arduino/OpenMRNLite.{h,cpp} to the arduino block above since these have arduino dependencies?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have them in your repo. I guess you don't need it and never build it via cmake?

Copy link
Collaborator

@atanisoft atanisoft Feb 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think they came over as a mass import from the exported tree create by the script. They are excluded from build via cmake: https://github.com/atanisoft/OpenMRNIDF/blob/5.1.0/CMakeLists.txt except when CONFIG_ENABLE_ARDUINO_DEPENDS is set (for IDF+Arduino builds which doesn't make much sense really)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

* master:
  Fix esp32 select race conditions. (#780)
  Latency test with maximum stats and custom process evaluation (#773)
  Fix compiler warnings in openmrn when using new GCC's. (#772)
  Upintegrate changes from the OpenMRNIDF repository (#771)
  Adds support for DCC extended accessories  (#769)
  Fix incorrect consumer identified message being emitted by dcc accy producer. (#768)
  Avoids rendering hidden segments. (#767)
  Adds trailing zero to the cdi XML file written to the filesystem. (#777)
  Fix target subdirectory name (#775)
  Fixes file comment.
  Adds an application (hub_test) for testing the throughput of a hub or a CAN-bus (#762)
  Adds a helper function to decode a 14-bit 9.2.1.1 address into address type and raw address. (#766)
  Fix broken test.
  Accessory packet refactoring and POM support (#764)
@balazsracz balazsracz merged commit 7a842f3 into master Feb 5, 2024
8 checks passed
@balazsracz balazsracz deleted the bracz-libify-update branch February 5, 2024 04:13
balazsracz added a commit that referenced this pull request Jun 21, 2024
…t-hub-router

# By Balazs Racz (26) and others
* 'master' of github.com:bakerstu/openmrn: (28 commits)
  Fix build of esp8266 train implementation.
  Removes unnecessary includes that might not exist on an embedded compiler.
  Fix compilation of TempFile under esp8266.
  Add libatomic to esp8266 nonos target.
  Fix compile errors in time_client app.
  Fixes in file memory space: (#786)
  Change startup state to stopped. (#784)
  Fixes write code for spiflash. (#782)
  Handles bus passive in TivaCan. (#781)
  Update libify to support IDF export with symlinks (#770)
  Fix esp32 select race conditions. (#780)
  Latency test with maximum stats and custom process evaluation (#773)
  Fix compiler warnings in openmrn when using new GCC's. (#772)
  Upintegrate changes from the OpenMRNIDF repository (#771)
  Adds support for DCC extended accessories  (#769)
  Fix incorrect consumer identified message being emitted by dcc accy producer. (#768)
  Avoids rendering hidden segments. (#767)
  Adds trailing zero to the cdi XML file written to the filesystem. (#777)
  Fix target subdirectory name (#775)
  Fixes file comment.
  ...

# Conflicts:
#	src/utils/constants.cxx
#	src/utils/sources
balazsracz added a commit that referenced this pull request Jun 21, 2024
* bracz-direct-hub-router: (35 commits)
  High-performance hub component for dealing with many sockets and high throughput (#760)
  Fix test build.
  Fixed comment and adds a todo.
  Remove unnecessary log.
  Fix comments and reduce unnecessary log level.
  FIx comments.
  Fix build of esp8266 train implementation.
  Removes unnecessary includes that might not exist on an embedded compiler.
  Fix compilation of TempFile under esp8266.
  Add libatomic to esp8266 nonos target.
  Fix compile errors in time_client app.
  Fixes in file memory space: (#786)
  Change startup state to stopped. (#784)
  Fixes write code for spiflash. (#782)
  Handles bus passive in TivaCan. (#781)
  Update libify to support IDF export with symlinks (#770)
  Fix esp32 select race conditions. (#780)
  Latency test with maximum stats and custom process evaluation (#773)
  Fix compiler warnings in openmrn when using new GCC's. (#772)
  Upintegrate changes from the OpenMRNIDF repository (#771)
  ...
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