Skip to content

Commit

Permalink
Merge pull request #5 from ARMmbed/master
Browse files Browse the repository at this point in the history
merge from master repo
  • Loading branch information
MarianSavchuk authored Mar 13, 2019
2 parents 03e6b46 + 23f95a0 commit fdbe2a1
Show file tree
Hide file tree
Showing 57 changed files with 51,289 additions and 8 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,13 @@ source/daplink/version_git.h
# automated test results
test_results

# mbedcli build related files
.mbed
.mbedignore
custom_profile.json
custom_targets.json
log.txt
mbed-os/

#vscode editor
.vscode
19 changes: 19 additions & 0 deletions projects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ module:
hic_k20dx: &module_hic_k20dx
- records/rtos/rtos-cm3.yaml
- records/hic_hal/k20dx.yaml
hic_k26f: &module_hic_k26f
- records/rtos/rtos-cm4.yaml
- records/hic_hal/k26f.yaml
hic_kl26z: &module_hic_kl26z
- records/rtos/rtos-cm0.yaml
- records/hic_hal/kl26z.yaml
Expand Down Expand Up @@ -91,6 +94,14 @@ projects:
- *module_if
- *module_hic_lpc4322
- records/family/all_family.yaml
k26f_bl:
- *module_bl
- *module_hic_k26f
- records/board/k26f_bl.yaml
k26f_if:
- *module_if
- *module_hic_k26f
- records/family/all_family.yaml
sam3u2c_bl:
- *module_bl
- *module_hic_sam3u2c
Expand Down Expand Up @@ -239,6 +250,10 @@ projects:
- *module_if
- *module_hic_k20dx
- records/board/mimxrt1050_evk_qspi.yaml
k26f_frdmk32w042_if:
- *module_if
- *module_hic_k26f
- records/board/frdmk32w042.yaml
lpc11u35_ff1705_l151_if:
- *module_if
- *module_hic_lpc11u35
Expand Down Expand Up @@ -571,6 +586,10 @@ projects:
- *module_if
- *module_hic_max32625
- records/board/max32620fthr.yaml
max32625_max32630fthr_if:
- *module_if
- *module_hic_max32625
- records/board/max32630fthr.yaml
max32625_if:
- *module_if
- *module_hic_max32625
Expand Down
7 changes: 7 additions & 0 deletions records/board/frdmk32w042.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
common:
sources:
board:
- source/board/frdmk32w042.c
family:
- source/family/freescale/k32w042/target.c
- source/family/freescale/target_reset_k32w_series.c
4 changes: 4 additions & 0 deletions records/board/k26f_bl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
common:
sources:
board:
- source/board/k26f_bl.c
7 changes: 7 additions & 0 deletions records/board/max32630fthr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
common:
sources:
board:
- source/board/max32630fthr.c
family:
- source/family/maxim/max32630/target.c
- source/family/maxim/max32630/flash_blob.c
47 changes: 47 additions & 0 deletions records/hic_hal/k26f.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
common:
target:
- mk64fn1m0xxx12 # Closest device.
core:
- Cortex-M4F
macros:
- INTERFACE_K26F
- CPU_MK26FN2M0VMD18
- DAPLINK_HIC_ID=0x97969909 # DAPLINK_HIC_ID_K26F
- FLASH_SSD_CONFIG_ENABLE_FLEXNVM_SUPPORT=0
- FLASH_DRIVER_IS_FLASH_RESIDENT=1
includes:
- source/hic_hal/freescale/k26f
- source/hic_hal/freescale/k26f/MK26F18
- source/hic_hal/freescale/iap
- projectfiles/uvision/k26f_bl/build
sources:
hic_hal:
- source/hic_hal/freescale/k26f
- source/hic_hal/freescale/k26f/MK26F18
- source/hic_hal/freescale/k26f/armcc
fsl_flash_driver:
- source/hic_hal/freescale/iap

tool_specific:
uvision:
misc:
ld_flags:
- --predefine="-I..\..\..\source\hic_hal\freescale\k26f"
c_flags:
- --no_unaligned_access
- --diag_suppress=66 # disable warning about enums not fitting in signed 32-bit
cxx_flags:
- --no_unaligned_access
asm_flags:
- --no_unaligned_access
make_armcc:
misc:
ld_flags:
- --predefine="-Isource\hic_hal\freescale\k26f"
c_flags:
- --no_unaligned_access
- --diag_suppress=66 # disable warning about enums not fitting in signed 32-bit
cxx_flags:
- --no_unaligned_access
asm_flags:
- --no_unaligned_access
34 changes: 34 additions & 0 deletions source/board/frdmk32w042.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/**
* @file frdmk32w042.c
* @brief board ID for the NXP FRDM-K32W042 board
*
* DAPLink Interface Firmware
* Copyright (c) 2017-2019, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#include "target_board.h"
#include "target_family.h"

const board_info_t g_board_info = {
.infoVersion = 0x0,
.board_id = "0225",
.family_id = kNXP_KinetisK32W_FamilyID,
.flags = kEnablePageErase,
.daplink_url_name = "PRODINFOHTM",
.daplink_drive_name = "K32W042",
.daplink_target_url = "http://www.nxp.com/frdm-k32w042",
.target_cfg = &target_device,
};
55 changes: 55 additions & 0 deletions source/board/k26f_bl.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/**
* @file k26f_bl.c
* @brief board ID and meta-data for the hardware interface circuit (HIC) based on the NXP K26F
*
* DAPLink Interface Firmware
* Copyright (c) 2009-2016, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#include "target_config.h"
#include "daplink_addr.h"
#include "compiler.h"
#include "target_board.h"
#include "target_family.h"

// Warning - changing the interface start will break backwards compatibility
COMPILER_ASSERT(DAPLINK_ROM_IF_START == KB(64));

// k26f target information
target_cfg_t target_device = {
.sector_size = DAPLINK_SECTOR_SIZE,
// Assume memory regions are same size. Flash algo should ignore requests
// when variable sized sectors exist
// .sector_cnt = ((.flash_end - .flash_start) / .sector_size);
.sector_cnt = (DAPLINK_ROM_IF_SIZE / DAPLINK_SECTOR_SIZE),
.flash_start = DAPLINK_ROM_IF_START,
.flash_end = DAPLINK_ROM_IF_START + DAPLINK_ROM_IF_SIZE,
.ram_start = 0x1fff0000,
.ram_end = 0x20030000,
/* .flash_algo not needed for bootloader */
};

//bootloader has no family
const target_family_descriptor_t *g_target_family = NULL;

const board_info_t g_board_info = {
.infoVersion = 0x0,
.board_id = "0000",
.daplink_url_name = "HELP_FAQHTM",
.daplink_drive_name = "BOOTLOADER",
.daplink_target_url = "https://mbed.com/daplink",
.target_cfg = &target_device,
};
30 changes: 30 additions & 0 deletions source/board/max32630fthr.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* @file max32630fthr.c
* @brief board ID for the Maxim Integrated's MAX32630FTHR
*
* DAPLink Interface Firmware
* Copyright (c) 2009-2016, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#include "target_family.h"
#include "target_board.h"

const board_info_t g_board_info = {
.board_id = "0409",
.family_id = kStub_HWReset_FamilyID,
.flags = kEnablePageErase,
.target_cfg = &target_device,
};
2 changes: 2 additions & 0 deletions source/daplink/RTX_Config.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@
#ifndef OS_CLOCK
#if defined(INTERFACE_LPC11U35) || defined(INTERFACE_K20D5) || defined (INTERFACE_KL26Z)
#define OS_CLOCK 48000000
#elif defined(INTERFACE_K26F)
#define OS_CLOCK 120000000
#elif defined(INTERFACE_SAM3U2C)
#define OS_CLOCK 96000000
#elif defined(INTERFACE_LPC4322)
Expand Down
3 changes: 0 additions & 3 deletions source/daplink/interface/tasks.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,12 @@ extern "C" {

#define MAIN_TASK_PRIORITY (10)
#define TIMER_TASK_PRIORITY (11)
#define DAP_TASK_PRIORITY (15)
#define MSC_TASK_PRIORITY (5)
#define TIMER_TASK_30_PRIORITY (TIMER_TASK_PRIORITY)

// trouble here is that reset for different targets is implemented differently so all targets
// have to use the largest stack or these have to be defined in multiple places... Not ideal
// may want to move away from threads for some of these behaviours to optimize mempory usage (RAM)
#define TIMER_TASK_30_STACK (136)
#define DAP_TASK_STACK (272)
#define MAIN_TASK_STACK (800)

#ifdef __cplusplus
Expand Down
Loading

0 comments on commit fdbe2a1

Please sign in to comment.