kopia lustrzana https://github.com/espressif/esp-idf
bugfix/esp-gdbstrub: add missing function for esp32c3/esp32h2.
rodzic
0d7b99e6b8
commit
1457c42f6f
|
@ -330,7 +330,7 @@ test_app_test_003:
|
||||||
|
|
||||||
test_app_test_004:
|
test_app_test_004:
|
||||||
extends: .test_app_esp32s2_template
|
extends: .test_app_esp32s2_template
|
||||||
parallel: 2
|
parallel: 4
|
||||||
tags:
|
tags:
|
||||||
- ESP32S2
|
- ESP32S2
|
||||||
- Example_GENERIC
|
- Example_GENERIC
|
||||||
|
|
|
@ -1,16 +1,9 @@
|
||||||
// Copyright 2015-2020 Espressif Systems (Shanghai) PTE LTD
|
/*
|
||||||
//
|
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
*
|
||||||
// you may not use this file except in compliance with the License.
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
// 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 "soc/uart_periph.h"
|
#include "soc/uart_periph.h"
|
||||||
#include "soc/gpio_periph.h"
|
#include "soc/gpio_periph.h"
|
||||||
|
@ -122,3 +115,26 @@ int esp_gdbstub_readmem(intptr_t addr)
|
||||||
uint32_t shift = (addr & 3) * 8;
|
uint32_t shift = (addr & 3) * 8;
|
||||||
return (val_aligned >> shift) & 0xff;
|
return (val_aligned >> shift) & 0xff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int esp_gdbstub_writemem(unsigned int addr, unsigned char data)
|
||||||
|
{
|
||||||
|
if (!check_inside_valid_region(addr)) {
|
||||||
|
/* see esp_cpu_configure_region_protection */
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int *i = (int *)(addr & (~3));
|
||||||
|
if ((addr & 3) == 0) {
|
||||||
|
*i = (*i & 0xffffff00) | (data << 0);
|
||||||
|
}
|
||||||
|
if ((addr & 3) == 1) {
|
||||||
|
*i = (*i & 0xffff00ff) | (data << 8);
|
||||||
|
}
|
||||||
|
if ((addr & 3) == 2) {
|
||||||
|
*i = (*i & 0xff00ffff) | (data << 16);
|
||||||
|
}
|
||||||
|
if ((addr & 3) == 3) {
|
||||||
|
*i = (*i & 0x00ffffff) | (data << 24);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
|
@ -1,16 +1,8 @@
|
||||||
// Copyright 2015-2020 Espressif Systems (Shanghai) PTE LTD
|
/*
|
||||||
//
|
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
*
|
||||||
// you may not use this file except in compliance with the License.
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
// 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 "soc/uart_periph.h"
|
#include "soc/uart_periph.h"
|
||||||
#include "soc/gpio_periph.h"
|
#include "soc/gpio_periph.h"
|
||||||
|
@ -122,3 +114,26 @@ int esp_gdbstub_readmem(intptr_t addr)
|
||||||
uint32_t shift = (addr & 3) * 8;
|
uint32_t shift = (addr & 3) * 8;
|
||||||
return (val_aligned >> shift) & 0xff;
|
return (val_aligned >> shift) & 0xff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int esp_gdbstub_writemem(unsigned int addr, unsigned char data)
|
||||||
|
{
|
||||||
|
if (!check_inside_valid_region(addr)) {
|
||||||
|
/* see esp_cpu_configure_region_protection */
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int *i = (int *)(addr & (~3));
|
||||||
|
if ((addr & 3) == 0) {
|
||||||
|
*i = (*i & 0xffffff00) | (data << 0);
|
||||||
|
}
|
||||||
|
if ((addr & 3) == 1) {
|
||||||
|
*i = (*i & 0xffff00ff) | (data << 8);
|
||||||
|
}
|
||||||
|
if ((addr & 3) == 2) {
|
||||||
|
*i = (*i & 0xff00ffff) | (data << 16);
|
||||||
|
}
|
||||||
|
if ((addr & 3) == 3) {
|
||||||
|
*i = (*i & 0x00ffffff) | (data << 24);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
|
@ -790,9 +790,7 @@ components/esp_event/private_include/esp_event_private.h
|
||||||
components/esp_event/test/test_default_loop.c
|
components/esp_event/test/test_default_loop.c
|
||||||
components/esp_event/test/test_event.c
|
components/esp_event/test/test_event.c
|
||||||
components/esp_gdbstub/esp32/gdbstub_target_config.h
|
components/esp_gdbstub/esp32/gdbstub_target_config.h
|
||||||
components/esp_gdbstub/esp32c3/gdbstub_esp32c3.c
|
|
||||||
components/esp_gdbstub/esp32c3/gdbstub_target_config.h
|
components/esp_gdbstub/esp32c3/gdbstub_target_config.h
|
||||||
components/esp_gdbstub/esp32h2/gdbstub_esp32h2.c
|
|
||||||
components/esp_gdbstub/esp32h2/gdbstub_target_config.h
|
components/esp_gdbstub/esp32h2/gdbstub_target_config.h
|
||||||
components/esp_gdbstub/esp32s2/gdbstub_target_config.h
|
components/esp_gdbstub/esp32s2/gdbstub_target_config.h
|
||||||
components/esp_gdbstub/esp32s3/gdbstub_target_config.h
|
components/esp_gdbstub/esp32s3/gdbstub_target_config.h
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
| Supported Targets | ESP32 | ESP32-S2 |
|
| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-H2 |
|
||||||
| ----------------- | ----- | -------- |
|
| ----------------- | ----- | -------- | -------- | -------- | -------- |
|
||||||
|
|
||||||
# Building
|
# Building
|
||||||
Several configurations are provided as `sdkconfig.ci.XXX` and serve as a template.
|
Several configurations are provided as `sdkconfig.ci.XXX` and serve as a template.
|
||||||
|
|
Ładowanie…
Reference in New Issue