Skip to content

Commit

Permalink
Add the MTB Murata-ABZ-078 board
Browse files Browse the repository at this point in the history
Add the file necessary for the MTB Murata-ABZ-078 board.
  • Loading branch information
c1728p9 committed Feb 4, 2018
1 parent 49e204e commit 33e0c58
Show file tree
Hide file tree
Showing 6 changed files with 154 additions and 0 deletions.
4 changes: 4 additions & 0 deletions projects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,10 @@ projects:
- *module_if
- *module_hic_lpc11u35
- records/board/mtb_mxchip_emw3166.yaml
lpc11u35_mtb_murata_abz_078_if:
- *module_if
- *module_hic_lpc11u35
- records/board/mtb_murata_abz_078.yaml
lpc11u35_mtb_wise1510_if:
- *module_if
- *module_hic_lpc11u35
Expand Down
11 changes: 11 additions & 0 deletions records/board/mtb_murata_abz_078.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
common:
macros:
- IO_CONFIG_OVERRIDE
includes:
- source/board/override_mtb
sources:
board:
- source/board/mtb_murata_abz_078.c
target:
- source/target/st/stm32l082cz/target.c
- source/target/st/target_reset.c
30 changes: 30 additions & 0 deletions source/board/mtb_murata_abz_078.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* @file 96b_nitrogen.c
* @brief board ID for the Seeed Studio 96Boards Nitrogen board
*
* 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 "stdbool.h"
#include "flash_manager.h"

const char *board_id = "0456";

void prerun_board_config(void)
{
flash_manager_set_page_erase(true);
}
72 changes: 72 additions & 0 deletions source/target/st/stm32l082cz/flash_blob.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/* Flash OS Routines (Automagically Generated)
* Copyright (c) 2009-2015 ARM Limited
*
* 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 "flash_blob.h"

static const uint32_t stm32l0xx_192_flash_prog_blob[] = {
0xE00ABE00, 0x062D780D, 0x24084068, 0xD3000040, 0x1E644058, 0x1C49D1FA, 0x2A001E52, 0x4770D1F2,
0x4603b510, 0x69804851, 0x0224240f, 0x4c4f4320, 0x484f61a0, 0x484f60e0, 0x484f60e0, 0x484f6120,
0x46206120, 0x240169c0, 0x40200524, 0xd1062800, 0x4c4c484b, 0x20066020, 0x484b6060, 0x200060a0,
0x4601bd10, 0x68404841, 0x43102202, 0x60504a3f, 0x68404610, 0x43102201, 0x60504a3c, 0x47702000,
0x483a4601, 0x22016840, 0x43100252, 0x60504a37, 0x68404610, 0x43102208, 0x60504a34, 0x60082000,
0x483ae002, 0x60104a37, 0x69804830, 0x0fc007c0, 0xd1f62800, 0x6840482d, 0x02522201, 0x4a2b4390,
0x46106050, 0x22086840, 0x4a284390, 0x20006050, 0x46034770, 0x47702001, 0x4603b570, 0x303f4608,
0x01890981, 0xe03b2500, 0x68404820, 0x02b62601, 0x4e1e4330, 0x46306070, 0x26086840, 0x4e1b4330,
0x24406070, 0x6810e004, 0x1d1b6018, 0x1f241d12, 0xd1f82c00, 0x481de002, 0x60304e1a, 0x69804813,
0x0fc007c0, 0xd1f62800, 0x69804810, 0x0236260f, 0x28004030, 0x480dd006, 0x43306980, 0x61b04e0b,
0xbd702001, 0x68404809, 0x02b62601, 0x4e0743b0, 0x46306070, 0x26086840, 0x4e0443b0, 0x1c6d6070,
0x42a80988, 0x2000d8c0, 0x0000e7eb, 0x40022000, 0x89abcdef, 0x02030405, 0x8c9daebf, 0x13141516,
0x00005555, 0x40003000, 0x00000fff, 0x0000aaaa, 0x00000000
};

// Start address of flash
static const uint32_t flash_start = 0x08000000;
// Size of flash
static const uint32_t flash_size = 0x00030000;

/**
* List of start and size for each size of flash sector - even indexes are start, odd are size
* The size will apply to all sectors between the listed address and the next address
* in the list.
* The last pair in the list will have sectors starting at that address and ending
* at address flash_start + flash_size.
*/
static const uint32_t sectors_info[] = {
0x08000000, 0x00000080,
};

static const program_target_t flash = {
0x20000021, // Init
0x20000063, // UnInit
0x00000000, // EraseChip - NOT SUPPORTED
0x20000081, // EraseSector
0x200000d9, // ProgramPage

// BKPT : start of blob + 1
// RSB : blob start + header + rw data offset
// RSP : stack pointer
{
0x20000001,
0x20000190,
0x20000800
},

0x20000000 + 0x00000A00, // mem buffer location
0x20000000, // location to write prog_blob in target RAM
sizeof(stm32l0xx_192_flash_prog_blob), // prog_blob size
stm32l0xx_192_flash_prog_blob, // address of prog_blob
0x00000080 // ram_to_flash_bytes_to_be_written
};
36 changes: 36 additions & 0 deletions source/target/st/stm32l082cz/target.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* @file target.c
* @brief Target information for the stm32l082cz
*
* DAPLink Interface Firmware
* Copyright (c) 2017-2017, 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"

// The file flash_blob.c must only be included in target.c
#include "flash_blob.c"

// target information
target_cfg_t target_device = {
.sector_size = 0x80,
.sector_cnt = (0x30000 / 0x80),
.flash_start = 0x08000000,
.flash_end = 0x08030000,
.ram_start = 0x20000000,
.ram_end = 0x20005000,
.flash_algo = (program_target_t *) &flash
};
1 change: 1 addition & 0 deletions test/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
( 0x311, 'k20dx_frdmk66f_if', 'k20dx_bl', None ), # TODO - set target to 'FRDM-K66F' when mbed-os supports this
( 0x350, 'k20dx_xdot_l151_if', 'k20dx_bl', None ), # TODO - set target to 'MTS-xDot-L151CC' when mbed-os supports this
( 0x0451, 'lpc11u35_mtb_mxchip_emw3166_if', None, None ), # TODO - set target when mbed-os supports this
( 0x0456, 'lpc11u35_mtb_murata_abz_078_if', None, None ), # TODO - set target when mbed-os supports this
( 0x458, 'lpc11u35_mtb_wise1510_if', None, None ), # TODO - set target when mbed-os supports this
( 0x459, 'lpc11u35_mtb_wise1530_if', None, None ), # TODO - set target when mbed-os supports this
( 0x460, 'lpc11u35_mtb_wise1570_if', None, None ), # TODO - set target when mbed-os supports this
Expand Down

0 comments on commit 33e0c58

Please sign in to comment.