Commit Graph

34321 Commits (fdf37c3217de26f28601c5dcab0e8b1553a470df)

Author SHA1 Message Date
Rami Elkhatib fdf37c3217 MPS2 CM3DS ethernet words instead of bytes
The functions smsc9220_receive_by_chunks and smsc9220_send_by_chunks are
supposed to implement receiving and sending packets by chunks. However,
the functions SMSC9220_EMAC::low_level_input and SMSC9220_EMAC::link_out,
which call them respectively, already require or assemble the full packet.
Also, smsc9220_receive_by_chunks doesn't implement the "chunks" part.

This commit renames the functions to smsc9220_receive_packet and
smsc9220_send_packet. The functions now do their operations by word
instead of by bytes. The functions SMSC9220_EMAC::low_level_input and
SMSC9220_EMAC::link_out already handle allocation, continuity and word
alignment of the packet buffer.
2022-05-12 18:27:49 -04:00
Rami Elkhatib f7aca62865 MPS2 CM3DS ethernet fix packet bug
The function smsc9220_receive_by_chunks loads data from the Ethernet port.
It is expected to return the Ethernet frame without the 4 CRC bytes.
However, it is required to call the Ethernet data port register (32-bit)
an amount equal to the number of frame words (including the 4 CRC bytes)
to pop all frame words. The current code doesn't call the register for the
last word (which has CRC data). This causes subsequent calls to have this
missed word at the beginning. The impact of this is huge as the high level
API is getting fed wrong data. The fix adds one additional call to the data
port register.
2022-05-12 18:25:15 -04:00
Rami Elkhatib cbfda0e23b MPS2 CM3DS ethernet fix heap bug
The function SMSC9220_EMAC::low_level_input should create a heap for the
packet equal to the size of the message (most of which are couple hundred
bytes). The current code uses maximum frame size (1522 bytes) for each
packet. This will cause the heap to quickly fill up. In fact, the default
memory size (lwip.mem-size) used for this heap is 1600 bytes. This means
that once you have one other packet allocated (extremely common), the
heap allocation will always fails.

Also, it is recommend to increase the default lwip.mem-size because that
amount is very small especially if you send or receive a few large packets
in the network. This is NOT done in current commit.
2022-05-12 18:23:41 -04:00
Rami Elkhatib 14aa25b8b7 MPS2 CM3DS ethernet fix deprecation warnings
The sleep_for function is updated to use the chrono time arguments since
the regular ones are deprecated.
2022-05-12 18:18:59 -04:00
Martin Kojtal e2e927e2ee
Merge pull request #15280 from 16L-YT/master
Support ITM tracing for Ambiq Apollo3 targets
2022-05-09 11:09:58 +02:00
Martin Kojtal 6fd736b704
Merge pull request #15281 from pan-/bluetooth-sign-write-warning
Bluetooth: Inform privacy risk of using signed writes.
2022-05-09 11:08:57 +02:00
YahyaTawil 7a108087ed Add default SWO pin number and config if not defined in Ambiq target 2022-05-06 17:24:59 +03:00
Vincent Coubard c34640495f
Bluetooth: Inform privacy risk of using signed writes.
The Cordio stack uses a single CSRK. It can be used by a
malicious device to track the Mbed OS application if signed
writes are used.

Signed-off-by: Vincent Coubard <vincent.coubard@arm.com>
2022-05-06 13:44:33 +01:00
YahyaTawil fabe70c0fc Enable ITM (SWO) tracing support to Ambiq Apollo3 targets 2022-05-05 15:47:35 +03:00
YahyaTawil 6467f77125 add ITM (SWO) tracing support to Ambiq Apollo3 targets 2022-05-05 15:45:09 +03:00
Martin Kojtal f2c9c60eb3
Merge pull request #15279 from jeromecoutant/PR_F334
STM32F334xx wrong RAM size
2022-05-04 14:22:17 +02:00
Jerome Coutant de4ea6ecd2 STM32F334xx wrong RAM size 2022-05-04 10:43:41 +02:00
Martin Kojtal 202686155f
Merge pull request #15277 from jeromecoutant/PR_L071KB
STM32L0: add MCU_STM32L071xB support
2022-05-02 16:39:57 +02:00
Jerome Coutant 6a8a52acf6 STM32L0: add MCU_STM32L071xB support 2022-04-29 09:47:25 +02:00
Martin Kojtal 9f326aa8b2
Merge pull request #15271 from caspermeijn/patch-1
semihosting: Fix typo in semihost_rename
2022-04-26 16:08:03 +02:00
Martin Kojtal 88b6bb0d85
Merge pull request #15269 from jeromecoutant/PR_G4_UART_ASYNC
STM32G4 : enable UART ASYNC
2022-04-26 11:57:21 +02:00
Martin Kojtal d17beb763e
Merge pull request #15274 from hifoolno/bug4
tcp_out: fix tcp_output_fill_options() arguments
2022-04-26 10:53:40 +02:00
Martin Kojtal 2d652c9df8
Merge pull request #15268 from jeromecoutant/PR_L0_I2C2
STM32L0 : I2C2 was missing
2022-04-26 10:53:25 +02:00
Casper Meijn 904f867bdc semihosting: Fix typo in semihost_rename
Fix typo in semihost_rename. Now it actually sends the `new_name` as well as the `old_name`.
2022-04-26 07:24:27 +02:00
Jerome Coutant 1985e77dae STM32G4 : enable SERIAL_ASYNCH in default configuration 2022-04-25 16:59:41 +02:00
Jerome Coutant 9b1d4ee62e STM32G4 : add UART5 in IRQ init 2022-04-25 16:59:30 +02:00
hifoolno 173c070d7d tcp_out: fix tcp_output_fill_options() arguments 2022-04-20 21:46:35 +08:00
Jerome Coutant 271ed686f3 STM32L0 : I2C2 was missing 2022-04-20 14:27:49 +02:00
Martin Kojtal decc6d022c
Merge pull request #15270 from 0xc0170/fix-test-github-action-git-failure
Github actions: use safe.directory for actions invoking git
2022-04-20 14:20:08 +02:00
Martin Kojtal ad15f0a7dc github action: add git safe directory
Where we use git commands directly, we need to add safe directory. This is because
the recent git changes introduced, for details visit:
https://github.com/actions/checkout/issues/766
2022-04-20 11:18:27 +01:00
Martin Kojtal 8a59067c1b github action: update checkout to v3
See https://github.com/actions/checkout/pull/762
Our tests are failing as checkout is not working (no git repository found)
2022-04-20 11:18:17 +01:00
Martin Kojtal 47a32a05d3
Merge pull request #15263 from MaximIntegrated/add-MAX32670
Add MAX32670
2022-04-20 11:22:38 +02:00
Sadik.Ozer 4dd01440c4 utf-8 check
Signed-off-by: Sadik.Ozer <Sadik.Ozer@maximintegrated.com>
2022-04-14 10:27:17 +03:00
Sadik.Ozer 8323e9a7f5 Fix GCC_ARM warnings
Signed-off-by: Sadik.Ozer <Sadik.Ozer@maximintegrated.com>
2022-04-08 11:23:39 -05:00
Sadik.Ozer 2f813fcbaa Update system files and mbed wrappers
Signed-off-by: Sadik.Ozer <Sadik.Ozer@maximintegrated.com>
2022-04-08 11:22:45 -05:00
Sadik.Ozer 7826582e44 Update LP API
Signed-off-by: Sadik.Ozer <Sadik.Ozer@maximintegrated.com>
2022-04-08 10:41:07 -05:00
Sadik.Ozer 92983653ed Leave last page of flash
It is used by rom bootloader

Signed-off-by: Sadik.Ozer <Sadik.Ozer@maximintegrated.com>
2022-04-08 10:41:07 -05:00
Sadik.Ozer 24f4738f24 Provide option to user to drive SS pin too
Signed-off-by: Sadik.Ozer <Sadik.Ozer@maximintegrated.com>
2022-04-08 10:41:06 -05:00
Sadik.Ozer f1bce7389f Provide all uart mapping
Signed-off-by: Sadik.Ozer <Sadik.Ozer@maximintegrated.com>
2022-04-08 10:41:06 -05:00
Sadik.Ozer 65e6595d7b Fix rtc read issue
Signed-off-by: Sadik.Ozer <Sadik.Ozer@maximintegrated.com>
2022-04-08 10:41:05 -05:00
Sadik.Ozer 8a2681bf6e Add peripheral driver files
Signed-off-by: Sadik.Ozer <Sadik.Ozer@maximintegrated.com>
2022-04-08 10:41:05 -05:00
Sadik.Ozer 704bfc786a Add peripheral interface files
Signed-off-by: Sadik.Ozer <Sadik.Ozer@maximintegrated.com>
2022-04-08 10:41:02 -05:00
Sadik.Ozer f40887acdd Remove __R because of confliction
Signed-off-by: Sadik.Ozer <Sadik.Ozer@maximintegrated.com>
2022-04-08 10:41:00 -05:00
Sadik.Ozer fc90e9a64e Update cmsis files
Signed-off-by: Sadik.Ozer <Sadik.Ozer@maximintegrated.com>
2022-04-08 10:40:59 -05:00
Sadik.Ozer 028a85c0b7 Add initial version of files
Signed-off-by: Sadik.Ozer <Sadik.Ozer@maximintegrated.com>
2022-04-08 10:40:57 -05:00
Martin Kojtal a6610e6169
Merge pull request #15261 from OpenNuvoton/nuvoton_ecp_alt_rand_mxz
Mbed TLS: Fix compile error with ECP alternative
2022-04-08 15:47:57 +02:00
Chun-Chieh Li 56f4b4cd29 Mbed TLS: Fix compile error with ECP alternative
Fix un-paired parenthesis when MBEDTLS_ECP_RANDOMIZE_MXZ_ALT is enabled
2022-04-08 17:24:55 +08:00
Martin Kojtal ddaceccf5a
Merge pull request #15258 from Nantis-GmbH/stm32-uart-num-fix
STM32F0: Fix target codes for number of UARTs
2022-04-05 10:24:13 +02:00
Bora Özgen 9ff358724f STM32F0: Fix target codes for number of UARTs 2022-04-04 16:22:51 +02:00
Martin Kojtal 18cddfa449
Merge pull request #15256 from jeromecoutant/PR_F103RC
STM32F1: add MCU_STM32F103xC support
2022-04-01 15:15:45 +02:00
Jerome Coutant 1cd6bf1399 STM32F1: add MCU_STM32F103xC support 2022-03-31 15:31:47 +02:00
Martin Kojtal 32c80ab64c
Merge pull request #15251 from MaximIntegrated/maxim-heap-region-calculation-for-arm
Correct heap region calculation for Maxim targets
2022-03-31 13:31:54 +02:00
Ahmet Alincak 751d0cf98b Correct heap region calculation for Maxim targets 2022-03-21 00:02:59 +03:00
Martin Kojtal 99cb88541a
Merge pull request #15249 from pilotak/master
STM32G4: Fix I2C timing
2022-03-18 15:48:13 +01:00
Pavel S bf599a2438
STM32G4: Fix I2C timing 2022-03-16 08:32:39 +01:00