-
Notifications
You must be signed in to change notification settings - Fork 513
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
Additional attributes for log messages #1022
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… the actual socket to be passed since this may be needed by some implementations (e.g. gcc.)
…vior in general Test SERIAL1_AvailableForWriteWorksCorrectly added to wiring/serial_loopback
…he correct address.) This allows potentially a 256k user firmware image to be used instead of a factory reset image. (And a 256k OTA image starting at 0x80C0000).
…efore it can be used (or the length field is 0, despite being a constant.) It's called from HAL_Core_Config to set up the location of the factory firmware, which is the key trigger for a factory reset in the bootloader. However, since the DCD wasn't initialized any attempts to write to the DCD before it was constructed would fail - the write offset was checked against the length (which is 0.) The fix is to create a static function instance so that it's constructed on first use, independent from global object construction.
Feature/electron/factory reset
multicast socket
I took a quick look at the code, namely the LogAttributes and the new interface. It would be good to get this in since it's quite extensible, and provides a good stable base for the logging API. Anyone have bandwidth to review in detail? |
Fixes USARTSerial::availableForWrite() behavior
* Save PinMode in STM32_PIN_MAP.user_property (HAL_GPIO_Save_Pin_Mode/HAL_GPIO_Recall_Pin_Mode) * adds https://github.com/spark/firmware/issues/993 to changelog
* adds TCP server implementation for gcc platform. * ensures that output is unbuffered, so that gcc standard output can be consumed by a process expecting a given protocol. * the weak setup/loop are not required with the gcc platform (including them can cause the intended setup/loop functions to be not linked.) * changelog
* makes the os_queue interface extensible, and exposes it to the dynamic library.
* adds eeprom support for virtual devices
* Enable bootloader OTA updates on Electron, disabled by removal of bootloader image from system-part2
Fixes flush() semantics for UDP and TCPClient
User API for logging
@sergeuz - any thoughts on how the log attributes can be added to the Wiring logging API? |
DAC and PWM resolution
sergeuz
force-pushed
the
feature/logging_attr
branch
from
June 11, 2016 00:20
3254f01
to
f289ccc
Compare
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements
LOG_ATTR()
macro which allows to specify additional attributes for log messages. For example:Only
code
anddetail
attributes are supported at the moment. New attributes (e.g. thread ID), can be easily added by extendingLogAttributes
structure.The implementation involves a bit of preprocessor magic in order to support named parameters syntax in both C and C++, so this patch also adds small header file with some typical preprocessor primitives (see
services/inc/preprocessor.h
). In principle, the same could be easily implemented using Boost.Preprocessor, I just wasn't sure if we want to introduce additional compile-time dependency for the firmware build.Note that this patch is based on the
feature/logger_api
branch and introduces ABI breaking changes to the existent dynalib interface of the logging library. It is likely too late to include this patch into upcoming 0.6.0, so I would mark current logging API as "experimental and subject to change" in thedevelop
and postpone publishing of the logging API reference until next release.