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

Consistency in the ordering of Linefeed/Carriage return in CDC and UART console prints #2998

Closed
wants to merge 79 commits into from

Conversation

k-bharadwaj
Copy link
Contributor

In the current implementation of the UART and CDC consoles, there can be a discrepency in the order of the Linefeed and Carriage Return print order. For consistency, change this to always be "\r\n" for both variants of the implementation. This is useful in automated echo tests for verifying payloads.

benmccrea and others added 30 commits April 13, 2022 15:46
Change CTRL_REG0 register access to read-modify-write so that
reserved bits are not modified. This allows the driver to be
used with lis2dk10.
This patch adds in autodetection and configuration of Gigadevice and Macronix
flash devices based on the manufacturer and device ID.  The intent in this is to
allow for a single binary to work on devices with different flash.

Signed-off-by: Andy Gross <andy.gross@juul.com>
This patch moves the set manual mode and adds a busy status check before
executing the read rdid qspi command.  On gigadevice flash devices, the read
rdid would fail intermittently due to the device not being ready for the
command.

Signed-off-by: Andy Gross <andy.gross@juul.com>
This patch adds a globally exported pointer to the RDID information detected
during flash init.  This can be used by other software to make decisions about
special actions taken with specific flash devices.

Signed-off-by: Andy Gross <andy.gross@juul.com>
This patch adds a facility to control whether or not the Dialog watchdog is
disabled when the hal_watchdog_init function is being called.

Signed-off-by: Andy Gross <andy.gross@juul.com>
da1469x: Add option to not disable watchdog on init
In the current implementation of the UART and CDC consoles, there
can be a discrepency in the order of the Linefeed and Carriage
Return print order. For consistency, we change this to always be
"\r\n" for both variants of the implementation. This is useful
in automated echo tests for verifying payloads.
BLE_TRANSPORT_NETCORE is defined so we can add some configuration while
building specifically on netcore, e.g. selecting default transport for
blehci.
This allows to read directly from an IPC flat buffer instead of reading
to a buffer.
The bootloader linker script currently has a flash length of 0x4000, while the image linker has an origin of 0x8000.

This closes the hole and doubles the usable bootloader space.
NRFX files take from Nordic github without local changes
Cosmetic changes due to NRFX 2.7 header and source upgrade
If BMP280 is connected to SPI with bus driver build
syscfg value for bus name was mismatched in source and yml.
hal_i2c_init function used to configure I2C hardware completely.
Power improvements changed this behavior, but those changes
were mostly for bus driver functionality where power management
is handled batter.

This brings back enabling hardware in hal_i2c_init in case
some application (sensors_test) uses I2C with hal functions
only and does not care about power management.
history_handle_t type was used to store pointer or result.
Code assumed that pointer will always be positive and error code
would be SYS_xxx so they would be negative.
For PIC32 RAM addresses start from 0x80000000 sot they were always
negative.

This removes double meaning of history_handle_t and some functions return
error codes separately from found history entries.
Watchdog is automatically enabled at start.
To enable build without watchdog it must be
manually frozen before it will fire since
idle task will not feed it when WATCHODG_INTERVAL==0.
kasjer and others added 29 commits May 22, 2023 18:48
bsp.h use uint8_t without including stdint.h.
For most cases it will work since bsp.h is likely to be
included later then some other headers.
If it is first include file compilation will fail:
Error: In file included from repos/apache-mynewt-core/apps/slinky/src/led.c:22:
repos/apache-mynewt-core/hw/bsp/hifive1/include/bsp/bsp.h:121:8: error: unknown type name 'uint8_t'
 extern uint8_t _ram_start;

Now required header is explicitly included.
Mcuboot 1.8 and newer have issues in test framework affecting
'newt test all'
USB function in TinyUSB stack is enabled by one of the following
definitions: CFG_TUD_CDC, CFG_TUD_HID, CFG_TUD_MSC, CFG_TUD_MIDI,
CFG_TUD_MSC, CFG_TUD_VENDOR, CFG_TUD_USBTMC, CFG_TUD_DFU_RT, CFG_TUD_DFU,
USBD_BTH need to be set to non-zero value.

So far some of those could be set in syscfg (definition were provided
in std_descriptors package). Following syscfg values were there:
USBD_HID, USBD_CDC, USBD_MSC, USBD_DFU, UDBD_BTH.

In order to enable standard functionality two things had to be set.
For example to have USB console one had to include hw/usb/tinyusb/cdc_console
(this could be done by settings CONSOLE_USB: 1) and separate settings in
target or application was needed USBD_CDC: 1.
For BT one had to set BLE_TRANSPORT_HS: usb and USBD_BTH: 1.

Now that any package can overwrite setting that is defined but no set
it is possible to for package that implements some USB functionality
to enabled it in TinyUSB stack.

This change leaves all previously defined USBD_xxx: values to not defined
and packages can just enabled it when they are included.

There is no need to have USBD_CDC: 1 when CONSOLE_USB: 1 is present.
For BTH separate commit will go to nimble repository.
without malloc().

This patch was originall added in commit:
567a822

A recent mbedtls update dropped these changes.  This patch re-introduces them.

Signed-off-by: Andy Gross <andy.gross@juul.com>
This patch was originally applied in:
commit f2ed758

But dropped when we upgraded mbedtls.  This adds it back in.

Signed-off-by: Andy Gross <andy.gross@juul.com>
So far CDC RX/TX fifo size was matching endpoint size.
Now it is possible to specify those in syscfg.yml.
This can improve console logging.
Default FIFO sizes remain unchanged.
CFG_TUSB_MCU should be set to OPT_MCU_STM32WB.
OPT_TUSB_STM32SB55 was originally proposed in TinyUSB pull request
but it was changed to version without 55
Current version (1.2.0) was quite outdated.
This updates CMSIS with more WBxx variants
Pure upgrade, no local changes.
HAL_UART_MODULE have to be enabled due to UARTPrescTable being
referenced in some macros.
When OS_MEMPOOL_CHECK was set to 1, code tried to
verify that block is not already in free list.
If during iteration over free list, memory block
was taken from the pool (from interrupt or higher
priority task) and already filled with data
mb_next could point to anything resulting in
MPU or hard fault exception.

Now critical section is added to prevent list
modification during check.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
When BUTTON_1_AS_STM32_DFU is set (that should be used only in bootloaer)
hal_bsp redirect execution to STM32 DFU bootloader to allow writing
bootloader or application.
Function boot_preboot was defined always even if functionality was not enabled.
This prevented alternative boot_preboot() functionality that can be provided
by other package.
Now hal_bsp.c only provides boot_preboot() when BUTTON_1_AS_STM32_DFU is set.
This provides USBD_MSC_DATA_IN_EP USBD_MSC_DATA_OUT_EP numbers
for each supported MCU.
USBD_MSC is not set by default (it was set to 0) so package
that implements MSC can provide this setting and it does not
need to be overriden in application or target.
MSC FAT view aims to allow firmware upgrade over USB when Mynewt device is visible as FAT disk.

MSC FAT View may be included in bootloader or application.
When it's part of the application new image written to device goes to SLOT1 and bootloader will
verify it and swap with current image.
New image will be confirmed (this can be disabled) on first access from host over USB.
MSC FAT view also allow to create custom files presented in file system that can be used to see
various aspects of running image.

By default README.TXT and MYNEWT.HTM are added.

Optionally 'Huge file' can show up that can be used for performance tests.
Optionally 'SLOT0.HEX' can show up with textual content of SLOT0.
Optionally 'FIRMWARE.IMG' can show up with binary content of SLOT0.
With this inclusion it is possible to use pin
defined in bsp.h (i.e. BUTTON_1) as pin for enabling
MSC FAT View in bootloader.
The IPC messages are written in 2 parts: the cmd byte and the rest.
It is unneccesary to already interrupt the other core for the first byte,
since it will be interrupted by the 2nd write already.

NOTE: updated for blocking writes
512 bytes seems to be insufficient for interrupt stack.
Stack increased to 768 bytes.
Huge file size handling from syscfg had typo and incorrect condition
resulting in huge file always taking most of the free spece.
Now huge file size can have size specified by the user.
HUGE_FILE_SIZE could be re-defined due to missing else or not defined at all.
Application could use sys/log/full or sys/log/stub.
Now it is possible to specify in syscfg LOG_VARIANT
to select one of the packages.
This way log variant can be easily changed in target with
one syscfg value.
Comment about erratas 33, 34 was valid only for first drop of NRF52832.
For NRF5340 erratas with those numbers exists but are not applicable here.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
OS_MEMPOOL_SIZE returned incorrect memory size for mpool buffer when
OS_MEMPOOL_GUARD was enabled.
OS_MEMPOOL_GUARD requires extra space between memory blocks and
OS_MEMPOOL_SIZE (and OS_MEMPOOL_BYTES) returned values that did not
include this extra space.
During os_mempool_init_internal() memory outside expected buffer
was clobbered.
This commit adds the ability to clear a log, a group of logs or
all logs using the 'log' shell command. The option -c was added
for this purpose. The syntax is similar to the log dump syntax.
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.

None yet