Commit Graph

74 Commits (0e7d172d0f3e3e424fcb7e6ac156517767cc6764)

Author SHA1 Message Date
Bence Kaposzta 709c121a0c Fixes typos in SMSC9220 Ethernet driver
Change-Id: I44a12ec1c57a926dadee81df1b84bd531d5cfccb
Signed-off-by: Bence Kaposzta <bence.kaposzta@arm.com>
2019-01-15 15:36:35 +01:00
Przemyslaw Stekiel 0111f5d5fe [ARM_SSG] Support boot stack size configuration option 2019-01-08 15:32:02 +01:00
Bence Káposzta 5dd6d19253 Merge branch 'master' into cm3ds_lp_requirements
Change-Id: I3c687694ee924938ec08ea40d0ddbcaf20dd0a73
2018-11-20 19:54:33 +01:00
Bence Kaposzta ee7cefc868 Add RTC and Sleep to CM3DS
This commit represents the second stage of the low power implementations
that are required from Mbed 5.10 onwards. Besides the default hal
implementations (rtc_api.c and sleep.c), the PL031 RTC's native driver
needed to be added. Due to HW limitations in SSE-050 and the CM3DS,
Deep Sleep couldn't be implemented, therefore it is functionally
identical to Sleep (WFI).

Change-Id: Ibed2bdb452f48c98024dc7ef07fb51a4425e0a80
Signed-off-by: Bence Kaposzta <bence.kaposzta@arm.com>
2018-11-14 11:10:26 +01:00
Bence Kaposzta 1b792317e4 Implement LP and us tickers to CM3DS
This commit represents the first stage of the low power implementations
that are required from Mbed 5.10 onwards. The LP ticker has been
implemented using a CMSDK Dual Timer's both timers (HW prescaler needed
to operate in the specified frequency domain), whereas the us ticker
uses one CMSDK Timer. Besides the default hal implementations (lp_ticker.c
and us_ticker.c), the CMSDK Dual Timer's native driver needed to be added.

Change-Id: I0b16b93dfac7753bebf430a2ce77761cb9c43ee5
Signed-off-by: Bence Kaposzta <bence.kaposzta@arm.com>
2018-11-14 11:10:09 +01:00
Martin Kojtal 0217f69511 Merge branch 'cm3ds_emac' of git://github.com/kapi90/mbed-os into dev_rollup 2018-11-08 09:21:38 +00:00
David Saada 542744d03c Support erase value in Flash HAL drivers, FlashIAP and block devices 2018-11-07 14:23:07 +02:00
Bence Kaposzta 9e6b1246a4 This commit adds EMAC driver for CM3DS that uses an SMSC LAN 9220
Ethernet controller. To ensure proper operation, some methods
needed to be updated in the SMSC9220's native driver as well.
It passes all related Greentea tests, however when supervised by
the Python environment it tends to fail because of Timeout.

The current timeout is set to 1200s that seems to be a little bit short
to finish all test cases, the timeout happens towards the end of the
last test case.

Change-Id: I914608c34828b493a80e133cd132537a297bfc84
Signed-off-by: Bence Kaposzta <bence.kaposzta@arm.com>
2018-10-29 15:30:47 +01:00
Deepika 2a8ae84cb1 ARM: Fix alignment of execute region to 8-byte boundary
--legacyalign, --no_legacyalign are deprecated from ARMC6 compiler, in order to
remove deprecated flags all linker files (GCC and IAR as well to have uniformity)
should strictly align to 8-byte boundary
2018-10-09 10:15:07 -05:00
Oren Cohen 787317b7eb Remove uVisor from mbed-os 2018-08-22 16:36:59 +03:00
Bence Kaposzta f335fc10a6 Fix for CM3DS GPIO api 2018-08-03 15:10:49 +02:00
Cruz Monrreal ae40a09036
Merge pull request #7508 from mprse/ticker_free
Ticker free() - requirements, pseudo code, tests, implementation
2018-08-02 23:05:14 -05:00
Nis Madsen 5567ac3be6 MPS2 platform: Enable interrupt on rx for UART 2018-07-27 14:11:27 +02:00
Przemyslaw Stekiel c0ee843d63 Add lp/us ticker_free() functions stub.
This patch adds only empty stubs of `us_ticker_free()` and `lp_ticker_free()` for all boards where these functions are not implemented.
2018-07-25 08:58:38 +02:00
Karl Zhang bbb97c803b Flash API: Enable Flash api on CM3DS
Implement flash_api.c for CM3DS on MPS2+.
Because MPS2+ board has no physical flash chip, the implementation emulates
flash over SRAM.
2018-07-09 21:07:48 +08:00
Karl Zhang 5be69f3143 FPGAIO: Add MISC IO initialization support 2018-05-29 10:12:04 +08:00
Bartek Szatkowski a305d849a8 Rename LOWPOWERTIMER to LPTICKER 2018-05-25 13:06:56 -05:00
Bartek Szatkowski 6e9f04bf2f Rename DEVICE_LOWPOWERTIMER to DEVICE_LPTICKER
That's to match DEVICE_USTICKER.
2018-05-25 12:20:09 -05:00
Przemyslaw Stekiel 1df54efc61 ARM_CM3DS_MPS2: add protection to lp_ticker.c.
Compile this file only when DEVICE_LOWPOWERTIMER is defined.
2018-05-25 12:04:32 -05:00
Bartek Szatkowski 38df9306d7 Update wsf_types.h to support updated CMSIS 2018-05-14 12:18:21 +01:00
Martin Kojtal e43d21d4ef
Merge pull request #6713 from theotherjimmy/arm-no-asm-inc
Drop include paths for ARM assembler
2018-05-03 16:31:04 +01:00
Jimmy Brisson d0e09851ac Use rel path for the ONLY arm asm include statement 2018-04-23 15:23:35 -05:00
Hugues de Valon e4b4a2fa45 CM3DS: switch us_ticker HAL to the tick domain
This commit changes the conversion function to do all the calculation
inside the HAL in ticks instead of microseconds.
The conversion will be done in Mbed OS side.
As SystemCoreClock is not a constant, it can not be used to initialise
the ticker_info_t structure.

Change-Id: I8fd4bf20dc5be8b965aca45f800a631275ccc724
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
2018-04-20 16:52:29 +01:00
Hugues de Valon 17b3cb1cde CM3DS: fix compiler warnings
This commit changes the code to fix the compiler warnings on ARM,
GCC_ARM and IAR.

Change-Id: I92676d2cc85daacde9f43f1898377a2cea750c50
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
2018-04-20 16:52:19 +01:00
Hugues de Valon b68ef3981d CM3DS: fix clock frequency value
This commit changes the clock frequency to the good value of 25 MHz.

Change-Id: I18e559718619e3b1942c42fda2413b690c7b5852
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
2018-04-20 16:40:36 +01:00
Hugues de Valon 9f107d2c73 CM3DS: merge the two system header files into one
This commit does not bring functional changes.
Here is the list of changes:
- merge CMSDK_CM3DS.h and SMM_MPS2.h into CM3DS.h
- remove unused code
- split copyright headers from first comment of each file

Change-Id: I79b7ee01689439b7d2fde9d13035a5edf17f69ff
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
2018-04-20 16:40:27 +01:00
Cruz Monrreal 641e814048
Merge pull request #6169 from hug-dev/cm3ds-trng
CM3DS Maintenance Pull Request: TRNG support (3/4)
2018-04-12 18:38:15 -05:00
Hugues de Valon acb53180ef CM3DS: enable TRNG with open-source TZ-TRNG driver
This patchs adds TRNG support using the upstreamed, open-source, TZ-TRNG
driver.
It also implements the HAL for TRNG and add it in features.
The mbed-os.py script deletes files that are unused by mbed-os.

Change-Id: Idf8eefd809f00d40e0ad3cf7657f2a8c2eca3505
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
2018-04-06 11:24:11 +01:00
Amanda Butler 5a68dcd29d Copy edit README.md
Copy edit for active voice, branding, spelling and other minor grammar fixes.
2018-03-12 16:25:05 +00:00
Amanda Butler 0ec844435d Copy edit README.md
Copy edit for branding, consistent tense and consistent style.
2018-03-12 16:25:05 +00:00
Hugues de Valon a453faa4e9 CM3DS: switch to larger memories for code and data
This patch changes the linker files and defines to use the ZBT SSRAM
instead of the FPGA Block RAM for code and data.
The section 4.1.1, Code and RAM memory map, of the CM3DS Eval RTL and
testbench user guide explains the available memories.
This switch improves code memory from 256 kB to 4 MB and data memory
from 128 kB to 4 MB.

However, the ZBT SSRAM1 for code memory begins at 0x00400000 while the
processor can only boot at address 0x00000000 which means that it
expects the vector table to be at that address. That is why we have to
create 2 load regions in the linker scripts: one with only the vector
table at address 0x0 and one with code + data at address 0x00400000.
Because of these two load regions, linker will produce different
behaviours:
    * GCC_ARM and IAR will only create 1 binary with both load regions
padding with 0 in between. The binary will then be very large (at least
4 MB) and the flash process will take longer.
    * ARM and ARMC6 will create 2 binaries for the two load regions. The
load addresses of the two binaries can be written in the images.txt file
on the MPS2 board. You can also use the --bincombined option of fromelf
utility to produce only 1 large binary.

This patch also adds the memory_zones.h file to try to put in common all
the memory addresses that were previously hard coded in the linker
scripts / startup files.

With that patch in, the simplest option is to directly use the .elf file
with the MPS2, which is only possible with mbb_v225.ebf and more recent
firmwares. It will now be the default for CM3DS.

This commit works with greentea thanks to the now merged pull request
ARMmbed/htrun#181 in order to copy .elf file to the MPS2 board.

Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
2018-03-12 16:25:05 +00:00
paul-szczepanek-arm 8347e76bf4 Merge https://github.com/ARMmbed/mbed-os 2018-03-01 18:11:41 +00:00
Cruz Monrreal 21483cd59d
Merge pull request #6167 from hug-dev/cm3ds-bug-fix
CM3DS Maintenance Pull Request: Bug fixes (1/4)
2018-02-27 13:44:05 -06:00
paul-szczepanek-arm 8e41de2e25 Merge branch 'master' of https://github.com/paul-szczepanek-arm/mbed-os 2018-02-27 17:23:25 +00:00
Cruz Monrreal 4139f13e31
Merge pull request #6170 from hug-dev/cm3ds-update-drivers
CM3DS Maintenance Pull Request: Driver updates (4/4)
2018-02-27 00:36:34 -06:00
Martin Kojtal 2661f6fe40 us ticker: fix fire interrupt handling
Few targets need more than just pending IRQ set. They include some flags to be
set that are checked in IRQ handler. This is the case for targets in this
commit.
2018-02-23 09:13:40 +01:00
Avinash Mehta a79a670575 CM3DS: update UART implementation
This commit adds the UART driver and updates the UART HAL implementation
to use this driver.
It also removes legacy definitions.

Change-Id: Ie8e7a7bb64c763a2d97bc66d949fab3596736bbc
Signed-off-by: Avinash Mehta <avinash.mehta@arm.com>
2018-02-21 18:21:22 +00:00
Tamas Kaman 37cf802a7a CM3DS: update SPI implementation
This commit adds the SPI driver which is now called by the SPI HAL
implementation.
It also removes legacy definitions.

Change-Id: Iadb20dda9dfa571db3de66c3a1ce45d80d8b81b6
Signed-off-by: Tamas Kaman <tamas.kaman@arm.com>
2018-02-21 18:20:24 +00:00
Galanakis, Minos 3abc3faba2 CM3DS: update GPIO, IRQ and port implementation
This commit adds the GPIO drivers. The HAL implementations
(gpio_api.c, gpio_irq_api.c, port_api.c) now call these drivers.
Legacy definitions have been removed.
Serial HAL implementation has been changed to compile at this stage.

Change-Id: Ib76a3186358f5029ed350da671132e8aa11194f7
Signed-off-by: Galanakis, Minos <minos.galanakis@arm.com>
2018-02-21 18:17:55 +00:00
Galanakis, Minos ffc7b91128 CM3DS: update tickers implementation
The HAL implementation (us_ticker.c and lp_ticker.c) now calls function
in cmsdk_ticker.c file. This file contains the necessary logic to be
able to only use one hardware timer (CMSDK timer) per mbed ticker.

This commit also updates the timer driver and removes legacy definition.

Change-Id: If40413822832117f9b78f38d2cdda7847284b035
Signed-off-by: Galanakis, Minos <minos.galanakis@arm.com>
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
2018-02-21 18:12:55 +00:00
Hugues de Valon ef7b16d9c5 CM3DS: fix non aligned access in Ethernet driver
This patch changes the way data is put in the TX_DATA_PORT register when
sending packet over Ethernet.
When this driver is compiled with release compilation profile
(space optimization compiler options) with Arm compiler version 5,
the line:
SMSC9220->TX_DATA_PORT = *pktptr;
generates the assembly instruction to get the pktptr pointed value:
LDM r2!, {r3}
with pktptr = r2
However, the code does not prevent the pktptr value from being unaligned
(to a 32 bits boundary) in that zone and the LDM instruction causes a
HardFault if this is the case. When the compiler option is not activated
(debug and develop compilation profiles), the compiler generates LDR
instruction instead which does not cause a HardFault.
The ARM v7-M states page B3-601: "Unaligned load-store multiples and
word or halfword exclusive accesses always fault."

To face that problem, we check if the data pointer is aligned or not. If
it is, we apply the same algorithm than before. If not, a local variable
is created and we copy in it, byte per byte, the contents at the
unaligned pointer. However, it will impact performances adding 8
instructions (one LD and one ST for each copied byte).

Change-Id: I11f6e82ce5521960d2ecf499f718f76fec29c0b0
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
2018-02-21 17:54:12 +00:00
Jimmy Brisson 15a9a0382b Enable Compiling with ARMC6 across all targets
remove duplicate sys.cpp
2017-09-11 13:20:32 -05:00
Jimmy Brisson 1f94ede86c Merge pull request #4744 from deepikabhavnani/spi_issue_4743
Allow user to set default transfer byte for block read
2017-07-24 14:45:30 -05:00
Deepika 1b797e9081 Closed review comments
1. Doxygen and Grammar related
2. Change dummy to spi_fill
3. Remove NXP driver and add default loop in spi block read (same as all
other drivers)
2017-07-21 09:46:22 -05:00
Martin Kojtal 10ea63b8e7 Ticker: add fire interrupt now function
fire_interrupt function should be used for events in the past. As we have now
64bit timestamp, we can figure out what is in the past, and ask a target to invoke
an interrupt immediately. The previous attemps in the target HAL tickers were not ideal, as it can wrap around easily (16 or 32 bit counters). This new
functionality should solve this problem.

set_interrupt for tickers in HAL code should not handle anything but the next match interrupt. If it was in the past is handled by the upper layer.

It is possible that we are setting next event to the close future, so once it is set it is already in the past. Therefore we add a check after set interrupt to verify it is in future.
If it is not, we fire interrupt immediately. This results in
two events - first one immediate, correct one. The second one might be scheduled in far future (almost entire ticker range),
that should be discarded.

The specification for the fire_interrupts are:
- should set pending bit for the ticker interrupt (as soon as possible),
the event we are scheduling is already in the past, and we do not want to skip
any events
- no arguments are provided, neither return value, not needed
- ticker should be initialized prior calling this function (no need to check if it is already initialized)

All our targets provide this new functionality, removing old misleading if (timestamp is in the past) checks.
2017-07-13 12:23:25 +01:00
Jimmy Brisson 17a88a80ef Merge pull request #4557 from mmorenobarm/master
Enable I2C and Analogin drivers for CM3DS_MPS2 target
2017-06-26 10:28:08 -05:00
Jimmy Brisson c7d6bbe295 Upcase all assembler file extensions 2017-06-20 14:50:08 -05:00
Marc Moreno Berengue 6b04bb364f Update port api driver to add missing ports
This patch updates port api driver to add missing
ports.

Signed-off-by: Marc Moreno <marc.morenoberengue@arm.com>
2017-06-15 17:30:31 +01:00
Marc Moreno Berengue 8de4c5323f Update CMSDK_CM3DS.h
This patch updates CMSDK_CM3DS.h to remove the
DMA peripheral memory map and defines, as
that peripheral is not present in the system.
In addition, some define names where updated
concerning rtc. RTC_api was updated accordingly.
This patch also updates SMM_MPS2 to align defines and
comments.

Signed-off-by: Marc Moreno <marc.morenoberengue@arm.com>
2017-06-15 17:30:31 +01:00
Marc Moreno Berengue fabfc85d31 Add analogin driver for CM3DS MPS2 target
This patch adds analogin driver for
CM3DS MPS2 target.

Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
2017-06-15 17:30:30 +01:00