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

Initial ports for u-blox C029/EVK-ODIN-W2 and HI2110. #2610

Closed
wants to merge 35 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
7345ea9
Test from Rob.
RobMeades Jun 14, 2016
4798653
Added u-blox EVK-ODIN-W2
Jun 14, 2016
6fb4265
Merge branch 'feature-a' of https://github.com/ARMmbed/mbed-ublox int…
Jun 14, 2016
bb27b84
Initial commit of ublox target files, containing HI2110 (AKA Boudica,…
RobMeades Jun 16, 2016
5a30594
Corrected memory map.
RobMeades Jun 16, 2016
279104d
Changed default toolchain for C029 to GCC_ARM
Jun 16, 2016
b9602f1
Fixed memory layout
Jun 16, 2016
c0d984d
Aligned u-blox C029 from DISCO_F439ZI
Jun 16, 2016
877bf86
Fixed LEDs and USBTX/RX
Jun 16, 2016
acdcb60
Added TARGET_UBLOX_C029
Jun 16, 2016
65af7e7
Merge branch 'master' of https://github.com/ARMmbed/mbed-ublox into f…
Jun 16, 2016
b227a9e
Add missing SDK lib files for HI2110 target.
RobMeades Jun 16, 2016
93fef2f
Merge remote-tracking branch 'remotes/upstream/master'
Jun 30, 2016
849dc4e
Pin mapping for EVK spin 3
ramtin-r Jun 30, 2016
c3306ef
Removed DAC since the pins are not available on the ODIN-W2 module.
Jun 30, 2016
b6cfabc
Changed USB debug UART from UART3 to UART1
Jun 30, 2016
f3b8798
Removed unavailable STM32F439 pins
Jun 30, 2016
8544e5e
Added CAN
Jun 30, 2016
1d62c48
Merge branch 'master' of https://github.com/ARMmbed/mbed-ublox
Jun 30, 2016
a18ac07
Remove rubbish from README.md and add a few extra exports to the .ld …
RobMeades Jul 15, 2016
75dd676
Merge branch 'master' of https://github.com/ARMmbed/mbed-ublox
RobMeades Jul 15, 2016
3226c75
Merge remote-tracking branch 'remotes/mbedos/master'
Aug 15, 2016
a5e6a91
Added drivers repos for mbed 5 for test
Aug 16, 2016
0d13030
Added UBLOX_ODIN_W2_DRIVERS features for test
Aug 16, 2016
40e2f36
Modification for building mbed 5
ramtin-r Aug 18, 2016
baea3fb
Merge remote-tracking branch 'remotes/mbed-os/master' into add_driver…
ramtin-r Aug 26, 2016
e144409
Fix bug where the usecond ticker would stop after a short while. Thi…
RobMeades Aug 31, 2016
dfe78ee
Revert "Modification for building mbed 5"
Sep 2, 2016
0b15bae
Reverted
Sep 2, 2016
73d1ebe
Reverted UBLOX_ODIN_W2_DRIVERS
Sep 2, 2016
16698ff
Editorial change. Been writing too much Python recently...
RobMeades Sep 2, 2016
0e451ad
Fixed clock as done in the DISCO_429 target
Sep 2, 2016
4abf063
Merge branch 'master' into add_drivers_test
Sep 2, 2016
b0c6c61
Merge remote-tracking branch 'remotes/origin/master' into add_drivers…
Sep 2, 2016
01397f3
Added release_versions for UBLOX_C029 supporting mbed 5
Sep 5, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 26 additions & 6 deletions hal/targets.json
Original file line number Diff line number Diff line change
Expand Up @@ -1163,14 +1163,16 @@
"UBLOX_C029": {
"supported_form_factors": ["ARDUINO"],
"core": "Cortex-M4F",
"default_toolchain": "uARM",
"default_toolchain": "GCC_ARM",
Copy link
Contributor

Choose a reason for hiding this comment

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

it should be either ARM

"supported_toolchains": ["ARM", "uARM", "GCC_ARM", "IAR"],
"extra_labels": ["STM", "STM32F4", "STM32F439", "STM32F439ZI"],
"macros": ["HSE_VALUE=24000000", "HSE_STARTUP_TIMEOUT=5000"],
"macros": ["HSE_VALUE=24000000", "HSE_STARTUP_TIMEOUT=5000", "CB_INTERFACE_SDIO","CB_CHIP_WL18XX","SUPPORT_80211D_ALWAYS","WLAN_ENABLED"],
"inherits": ["Target"],
"device_has": ["ANALOGIN", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
"default_lib": "small"
"device_has": ["ANALOGIN", "CAN", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"],
"default_build": "standard",
"release_versions": ["5"]
},

"NZ32_SC151": {
"inherits": ["Target"],
"core": "Cortex-M3",
Expand Down Expand Up @@ -2001,13 +2003,31 @@
"core": "Cortex-M4F",
"default_toolchain": "ARM",
"extra_labels": ["NUVOTON", "NUC472", "NUMAKER_PFM_NUC472"],
"macros": ["MBEDTLS_ENTROPY_HARDWARE_ALT"],
"macros": ["MBEDTLS_ENTROPY_HARDWARE_ALT"],
"is_disk_virtual": true,
"supported_toolchains": ["ARM", "uARM", "GCC_ARM", "IAR"],
"inherits": ["Target"],
"progen": {"target": "numaker-pfm-nuc472"},
"device_has": ["ANALOGIN", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH"],
"features": ["IPV4"],
"release_versions": ["2", "5"]
}
},
"HI2110": {
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be better if this change-set for HI2110 or any other target besides C029 would be sent via separate pull request (not to mix 2 or 3 different targets).

Choose a reason for hiding this comment

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

Yes, I agree. I’m about to rebase it now . I will create a new pull request.

Choose a reason for hiding this comment

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

I added a separate PR for the C029 changes only. This one can be closed.
#2669

"inherits": ["Target"],
"core": "Cortex-M0",
"default_toolchain": "GCC_ARM",
"supported_toolchains": ["GCC_ARM"],
"extra_labels": ["ublox"],
"macros": ["TARGET_PROCESSOR_FAMILY_BOUDICA", "BOUDICA_SARA"],
"device_has": ["INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "SERIAL", "SLEEP", "STDIO_MESSAGES"],
"default_build": "small"
},
"SARA_NBIOT": {
"inherits": ["HI2110"],
"extra_labels": ["ublox", "HI2110"]
},
"SARA_NBIOT_EVK": {
"inherits": ["SARA_NBIOT"],
"extra_labels": ["ublox", "HI2110", "SARA_NBIOT"]
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* Linker script to configure memory regions. */
MEMORY
{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K
RAM (rwx) : ORIGIN = 0x200001AC, LENGTH = 192k - 0x1AC
RAM2 (rwx) : ORIGIN = 0x10000000, LENGTH = 64k
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048k
CCM (rwx) : ORIGIN = 0x10000000, LENGTH = 64K
RAM (rwx) : ORIGIN = 0x200001AC, LENGTH = 192k - 0x1AC
}

/* Linker script to place sections and symbol values. Should be used together
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,14 @@ LoopFillZerobss:
/* Call the clock system intitialization function.*/
bl SystemInit
/* Call static constructors */
bl __libc_init_array
//bl __libc_init_array
/* Call the application's entry point.*/
bl main
//bl main
// Calling the crt0 'cold-start' entry point. There __libc_init_array is called
// and when existing hardware_init_hook() and software_init_hook() before
// starting main(). software_init_hook() is available and has to be called due
// to initializsation when using rtos.
bl _start
bx lr
.size Reset_Handler, .-Reset_Handler

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ void timer_irq_handler(void) {

// Reconfigure the HAL tick using a standard timer instead of systick.
HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority) {
RCC_ClkInitTypeDef RCC_ClkInitStruct;
uint32_t PclkFreq;

// Get clock configuration
// Note: PclkFreq contains here the Latency (not used after)
HAL_RCC_GetClockConfig(&RCC_ClkInitStruct, &PclkFreq);

// Get TIM5 clock value
PclkFreq = HAL_RCC_GetPCLK1Freq();

// Enable timer clock
TIM_MST_RCC;

Expand All @@ -79,8 +89,14 @@ HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority) {
// Configure time base
TimMasterHandle.Instance = TIM_MST;
TimMasterHandle.Init.Period = 0xFFFFFFFF;
TimMasterHandle.Init.Prescaler = (uint32_t)( SystemCoreClock / 1000000) - 1; // 1 us tick
TimMasterHandle.Init.ClockDivision = 0;

// TIMxCLK = PCLKx when the APB prescaler = 1 else TIMxCLK = 2 * PCLKx
if (RCC_ClkInitStruct.APB1CLKDivider == RCC_HCLK_DIV1)
TimMasterHandle.Init.Prescaler = (uint16_t)((PclkFreq) / 1000000) - 1; // 1 us tick
else
TimMasterHandle.Init.Prescaler = (uint16_t)((PclkFreq * 2) / 1000000) - 1; // 1 us tick

TimMasterHandle.Init.ClockDivision = 0;
TimMasterHandle.Init.CounterMode = TIM_COUNTERMODE_UP;
TimMasterHandle.Init.RepetitionCounter = 0;
HAL_TIM_OC_Init(&TimMasterHandle);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@

#define HAL_TICK_DELAY (1000) // 1 ms

void HAL_SuspendTick(void);

#ifdef __cplusplus
}
#endif
Expand Down
Loading