Files
mbed-os/tools/flash_algo/c_blob_mbed.tmpl
Beslan 0ef1717155
Some checks failed
Basic Checks / license-check (push) Has been cancelled
Basic Checks / include-check (push) Has been cancelled
Basic Checks / style-check (push) Has been cancelled
Basic Checks / docs-check (push) Has been cancelled
Basic Checks / python-tests (push) Has been cancelled
Basic Checks / pin-validation (push) Has been cancelled
Basic Checks / cmake-checks (push) Has been cancelled
Basic Checks / frozen-tools-check (push) Has been cancelled
Publish or Update docker image for head of branch / prepare-tags (push) Has been cancelled
Release or update docker image for a released mbed-os version / prepare-tags (push) Has been cancelled
Publish or Update docker image for head of branch / build-container (push) Has been cancelled
Publish or Update docker image for head of branch / test-container (linux/amd64) (push) Has been cancelled
Publish or Update docker image for head of branch / test-container (linux/arm64) (push) Has been cancelled
Publish or Update docker image for head of branch / deploy-container (push) Has been cancelled
Release or update docker image for a released mbed-os version / build-container (push) Has been cancelled
Release or update docker image for a released mbed-os version / test-container (linux/amd64) (push) Has been cancelled
Release or update docker image for a released mbed-os version / test-container (linux/arm64) (push) Has been cancelled
Release or update docker image for a released mbed-os version / deploy-container (push) Has been cancelled
Prune temporary docker images / prune-images (push) Has been cancelled
Mirror mbed-os-6.15.0
2026-07-10 18:42:39 +03:00

60 lines
1.9 KiB
Cheetah

/* mbed Microcontroller Library
* Copyright (c) 2017 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_api.h"
#include "flash_data.h"
#include "platform/mbed_critical.h"
// This file is automatically generated
#if DEVICE_FLASH
// This is a flash algo binary blob. It is PIC (position independent code) that should be stored in RAM
static uint32_t FLASH_ALGO[] = {
{{algo.format_algo_data(4, 8, "c")}}
};
static const flash_algo_t flash_algo_config = {
.init = {{'0x%x' % algo.symbols['Init']}},
.uninit = {{'0x%x' % algo.symbols['UnInit']}},
.erase_sector = {{'0x%x' % algo.symbols['EraseSector']}},
.program_page = {{'0x%x' % algo.symbols['ProgramPage']}},
.static_base = {{'0x%x' % algo.rw_start}},
.algo_blob = FLASH_ALGO
};
static const sector_info_t sectors_info[] = {
{%- for start, size in algo.sector_sizes %}
{{ "{0x%x, 0x%x}" % (start + algo.flash_start, size) }},
{%- endfor %}
};
static const flash_target_config_t flash_target_config = {
.page_size = {{'0x%x' % algo.page_size}},
.flash_start = {{'0x%x' % algo.flash_start}},
.flash_size = {{'0x%x' % algo.flash_size}},
.sectors = sectors_info,
.sector_info_count = sizeof(sectors_info) / sizeof(sector_info_t)
};
void flash_set_target_config(flash_t *obj)
{
obj->flash_algo = &flash_algo_config;
obj->target_config = &flash_target_config;
}
#endif