diff --git a/arch/risc-v/src/esp32c3/esp32c3_ble_adapter.c b/arch/risc-v/src/esp32c3/esp32c3_ble_adapter.c index 62f9dc098b..a2be855eb2 100644 --- a/arch/risc-v/src/esp32c3/esp32c3_ble_adapter.c +++ b/arch/risc-v/src/esp32c3/esp32c3_ble_adapter.c @@ -330,9 +330,9 @@ extern int btdm_hci_tl_io_event_post(int event); /* VHCI */ -extern bool API_vhci_host_check_send_available(void); /* Functions in bt lib */ -extern void API_vhci_host_send_packet(uint8_t * data, uint16_t len); -extern int API_vhci_host_register_callback(const vhci_host_callback_t +extern bool api_vhci_host_check_send_available(void); /* Functions in bt lib */ +extern void api_vhci_host_send_packet(uint8_t * data, uint16_t len); +extern int api_vhci_host_register_callback(const vhci_host_callback_t *callback); /* TX power */ @@ -2404,7 +2404,7 @@ bool esp32c3_vhci_host_check_send_available(void) return false; } - return API_vhci_host_check_send_available(); + return api_vhci_host_check_send_available(); } /**************************************************************************** @@ -2428,7 +2428,7 @@ void esp32c3_vhci_host_send_packet(uint8_t *data, uint16_t len) return; } - API_vhci_host_send_packet(data, len); + api_vhci_host_send_packet(data, len); } /**************************************************************************** @@ -2452,7 +2452,7 @@ int esp32c3_vhci_register_callback(const esp_vhci_host_callback_t *callback) return ret; } - ret = API_vhci_host_register_callback( + ret = api_vhci_host_register_callback( (const vhci_host_callback_t *)callback) == 0 ? 0 : -1; return ret; } diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/scripts/esp32c3.template.ld b/boards/risc-v/esp32c3/esp32c3-devkit/scripts/esp32c3.template.ld index 82a33980ee..c637f53472 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/scripts/esp32c3.template.ld +++ b/boards/risc-v/esp32c3/esp32c3-devkit/scripts/esp32c3.template.ld @@ -30,6 +30,8 @@ #include +#include "esp32c3_aliases.ld" + #define SRAM_IRAM_START 0x4037c000 #define SRAM_DRAM_START 0x3fc7c000 diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/scripts/esp32c3_aliases.ld b/boards/risc-v/esp32c3/esp32c3-devkit/scripts/esp32c3_aliases.ld new file mode 100644 index 0000000000..965d592abc --- /dev/null +++ b/boards/risc-v/esp32c3/esp32c3-devkit/scripts/esp32c3_aliases.ld @@ -0,0 +1,29 @@ +/**************************************************************************** + * boards/risc-v/esp32c3/esp32c3-devkit/scripts/esp32c3_aliases.ld + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you 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. + * + ****************************************************************************/ + +#ifdef CONFIG_ESP32C3_BLE + +/* Lower-case aliases for BLE library symbols not compliant to nxstyle */ + +api_vhci_host_check_send_available = API_vhci_host_check_send_available; +api_vhci_host_send_packet = API_vhci_host_send_packet; +api_vhci_host_register_callback = API_vhci_host_register_callback; + +#endif diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/src/Makefile b/boards/risc-v/esp32c3/esp32c3-devkit/src/Makefile index f46c6cb997..61ae8cff6f 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/src/Makefile +++ b/boards/risc-v/esp32c3/esp32c3-devkit/src/Makefile @@ -115,7 +115,7 @@ SCRIPTOUT = $(SCRIPTDIR)$(DELIM)esp32c3_out.ld .PHONY = context distclean $(SCRIPTOUT): $(SCRIPTIN) $(CONFIGFILE) - $(Q) $(CC) -isystem $(TOPDIR)/include -C -P -x c -E $(SCRIPTIN) -o $@ + $(Q) $(CC) -isystem $(TOPDIR)/include -I $(BOARD_DIR)/scripts -C -P -x c -E $(SCRIPTIN) -o $@ context:: $(SCRIPTOUT)