diff --git a/targets/esp32c6.ld b/targets/esp32c6.ld index 48e9de9aa..178a6f72b 100644 --- a/targets/esp32c6.ld +++ b/targets/esp32c6.ld @@ -257,9 +257,15 @@ phy_param_rom = 0x4087fce8; * (generated from target/esp32c6/interface-esp32c6.yml, * md5 06c13e133e0743d09b87aba30d3e213b). * - * Every symbol uses PROVIDE() so that a real definition in the program - * (picolibc, compiler-rt, or espradio itself) always takes precedence over + * ROM *functions* (0x4000xxxx) use PROVIDE(), so a real definition in the + * program (picolibc, compiler-rt, or a vendored library) takes precedence over * the ROM copy. + * + * ROM *data* (0x408xxxxx) is assigned unconditionally instead, matching + * esp32c3.ld. These are variables in RAM that mask ROM code reads and writes at + * a fixed address, so they are shared storage rather than a fallback: with + * PROVIDE(), a weak definition elsewhere in the program wins and the program + * and the ROM then each use a different location for the same variable. */ /* --- esp32c6.rom.ld --- */ @@ -307,8 +313,8 @@ PROVIDE( GetSecurityInfoProc = 0x400000bc ); PROVIDE( Uart_Init = 0x400000c0 ); PROVIDE( ets_set_user_start = 0x400000c4 ); PROVIDE( ets_rom_layout_p = 0x4004fffc ); -PROVIDE( ets_ops_table_ptr = 0x4087fff8 ); -PROVIDE( g_saved_pc = 0x4087fffc ); +ets_ops_table_ptr = 0x4087fff8; +g_saved_pc = 0x4087fffc; PROVIDE( mz_adler32 = 0x400000c8 ); PROVIDE( mz_free = 0x400000cc ); PROVIDE( tdefl_compress = 0x400000d0 ); @@ -383,9 +389,9 @@ PROVIDE( spi_flash_get_chip_size = 0x400001e0 ); PROVIDE( spi_flash_guard_set = 0x400001e4 ); PROVIDE( spi_flash_guard_get = 0x400001e8 ); PROVIDE( spi_flash_read_encrypted = 0x400001ec ); -PROVIDE( rom_spiflash_legacy_funcs = 0x4087fff0 ); -PROVIDE( rom_spiflash_legacy_data = 0x4087ffec ); -PROVIDE( g_flash_guard_ops = 0x4087fff4 ); +rom_spiflash_legacy_funcs = 0x4087fff0; +rom_spiflash_legacy_data = 0x4087ffec; +g_flash_guard_ops = 0x4087fff4; PROVIDE( esp_rom_spiflash_write_disable = 0x40000278 ); PROVIDE( Cache_Get_ICache_Line_Size = 0x40000628 ); PROVIDE( Cache_Get_Mode = 0x4000062c ); @@ -421,8 +427,8 @@ PROVIDE( Cache_Get_IROM_MMU_End = 0x400006ac ); PROVIDE( Cache_Get_DROM_MMU_End = 0x400006b0 ); PROVIDE( Cache_Travel_Tag_Memory = 0x400006bc ); PROVIDE( Cache_Get_Virtual_Addr = 0x400006c0 ); -PROVIDE( rom_cache_op_cb = 0x4087ffcc ); -PROVIDE( rom_cache_internal_table_ptr = 0x4087ffc8 ); +rom_cache_op_cb = 0x4087ffcc; +rom_cache_internal_table_ptr = 0x4087ffc8; PROVIDE( ets_clk_get_xtal_freq = 0x400006c4 ); PROVIDE( ets_clk_get_cpu_freq = 0x400006c8 ); PROVIDE( ets_clk_apb_wait_ready = 0x400006cc ); @@ -700,8 +706,8 @@ PROVIDE( spi_flash_boot_attach = 0x4000026c ); PROVIDE( esp_flash_read_chip_id = 0x40000270 ); PROVIDE( detect_spi_flash_chip = 0x40000274 ); PROVIDE( esp_flash_suspend_cmd_init = 0x4000027c ); -PROVIDE( esp_flash_default_chip = 0x4087ffe8 ); -PROVIDE( esp_flash_api_funcs = 0x4087ffe4 ); +esp_flash_default_chip = 0x4087ffe8; +esp_flash_api_funcs = 0x4087ffe4; PROVIDE( spi_flash_chip_generic_probe = 0x40000280 ); PROVIDE( spi_flash_chip_generic_detect_size = 0x40000284 ); PROVIDE( spi_flash_chip_generic_write = 0x40000288 ); @@ -734,8 +740,8 @@ PROVIDE( spi_flash_chip_generic_suspend_cmd_conf = 0x400002f0 ); PROVIDE( spi_flash_chip_gd_get_io_mode = 0x400002f4 ); PROVIDE( spi_flash_chip_gd_probe = 0x400002f8 ); PROVIDE( spi_flash_chip_gd_set_io_mode = 0x400002fc ); -PROVIDE( spi_flash_chip_generic_config_data = 0x4087ffe0 ); -PROVIDE( spi_flash_encryption = 0x4087ffdc ); +spi_flash_chip_generic_config_data = 0x4087ffe0; +spi_flash_encryption = 0x4087ffdc; PROVIDE( memspi_host_read_id_hs = 0x40000300 ); PROVIDE( memspi_host_read_status_hs = 0x40000304 ); PROVIDE( memspi_host_flush_cache = 0x40000308 ); @@ -816,7 +822,7 @@ PROVIDE( multi_heap_dump = 0x40000494 ); PROVIDE( multi_heap_free_size_impl = 0x40000498 ); PROVIDE( multi_heap_minimum_free_size_impl = 0x4000049c ); PROVIDE( multi_heap_get_info_impl = 0x400004a0 ); -PROVIDE( heap_tlsf_table_ptr = 0x4087ffd8 ); +heap_tlsf_table_ptr = 0x4087ffd8; /* --- esp32c6.rom.phy.ld --- */ PROVIDE( phy_param_addr = 0x40001104 ); @@ -1293,98 +1299,98 @@ PROVIDE( esp_test_clr_rx_mu_statistics = 0x400010f8 ); PROVIDE( esp_test_enable_rx_mu_statistics = 0x400010fc ); PROVIDE( esp_test_disable_rx_mu_statistics = 0x40001100 ); PROVIDE( our_instances_ptr = 0x4004ffe0 ); -PROVIDE( pTxRx = 0x4087ff80 ); -PROVIDE( lmacConfMib_ptr = 0x4087ff7c ); -PROVIDE( our_wait_eb = 0x4087ff78 ); -PROVIDE( our_tx_eb = 0x4087ff74 ); -PROVIDE( pp_wdev_funcs = 0x4087ff70 ); -PROVIDE( g_osi_funcs_p = 0x4087ff6c ); -PROVIDE( wDevCtrl_ptr = 0x4087ff68 ); +pTxRx = 0x4087ff80; +lmacConfMib_ptr = 0x4087ff7c; +our_wait_eb = 0x4087ff78; +our_tx_eb = 0x4087ff74; +pp_wdev_funcs = 0x4087ff70; +g_osi_funcs_p = 0x4087ff6c; +wDevCtrl_ptr = 0x4087ff68; PROVIDE( g_wdev_last_desc_reset_ptr = 0x4004ffdc ); -PROVIDE( wDevMacSleep_ptr = 0x4087ff64 ); -PROVIDE( g_lmac_cnt_ptr = 0x4087ff60 ); +wDevMacSleep_ptr = 0x4087ff64; +g_lmac_cnt_ptr = 0x4087ff60; PROVIDE( our_controls_ptr = 0x4004ffd8 ); -PROVIDE( pp_sig_cnt_ptr = 0x4087ff5c ); -PROVIDE( g_eb_list_desc_ptr = 0x4087ff58 ); -PROVIDE( s_fragment_ptr = 0x4087ff54 ); -PROVIDE( if_ctrl_ptr = 0x4087ff50 ); -PROVIDE( g_intr_lock_mux = 0x4087ff4c ); -PROVIDE( g_wifi_global_lock = 0x4087ff48 ); -PROVIDE( s_wifi_queue = 0x4087ff44 ); -PROVIDE( pp_task_hdl = 0x4087ff40 ); -PROVIDE( s_pp_task_create_sem = 0x4087ff3c ); -PROVIDE( s_pp_task_del_sem = 0x4087ff38 ); -PROVIDE( g_wifi_menuconfig_ptr = 0x4087ff34 ); -PROVIDE( xphyQueue = 0x4087ff30 ); -PROVIDE( ap_no_lr_ptr = 0x4087ff2c ); -PROVIDE( rc11BSchedTbl_ptr = 0x4087ff28 ); -PROVIDE( rc11NSchedTbl_ptr = 0x4087ff24 ); -PROVIDE( rcLoRaSchedTbl_ptr = 0x4087ff20 ); -PROVIDE( BasicOFDMSched_ptr = 0x4087ff1c ); -PROVIDE( trc_ctl_ptr = 0x4087ff18 ); -PROVIDE( g_pm_cnt_ptr = 0x4087ff14 ); -PROVIDE( g_pm_ptr = 0x4087ff10 ); -PROVIDE( g_pm_cfg_ptr = 0x4087ff0c ); -PROVIDE( g_esp_mesh_quick_funcs_ptr = 0x4087ff08 ); -PROVIDE( g_txop_queue_status_ptr = 0x4087ff04 ); -PROVIDE( g_mac_sleep_en_ptr = 0x4087ff00 ); -PROVIDE( g_mesh_is_root_ptr = 0x4087fefc ); -PROVIDE( g_mesh_topology_ptr = 0x4087fef8 ); -PROVIDE( g_mesh_init_ps_type_ptr = 0x4087fef4 ); -PROVIDE( g_mesh_is_started_ptr = 0x4087fef0 ); -PROVIDE( g_config_func = 0x4087feec ); -PROVIDE( g_net80211_tx_func = 0x4087fee8 ); -PROVIDE( g_timer_func = 0x4087fee4 ); -PROVIDE( s_michael_mic_failure_cb = 0x4087fee0 ); -PROVIDE( wifi_sta_rx_probe_req = 0x4087fedc ); -PROVIDE( g_tx_done_cb_func = 0x4087fed8 ); -PROVIDE( g_per_conn_trc = 0x4087fe8c ); -PROVIDE( s_encap_amsdu_func = 0x4087fe88 ); -PROVIDE( rx_beacon_count = 0x4087fe84 ); -PROVIDE( rx_beacon_sw_parse = 0x4087fe80 ); -PROVIDE( rx_beacon_hw_parse = 0x4087fe7c ); -PROVIDE( rx_beacon_tim_count = 0x4087fe78 ); -PROVIDE( rx_beacon_tim_udata = 0x4087fe74 ); -PROVIDE( rx_beacon_tim_udata_bitmap = 0x4087fe70 ); -PROVIDE( rx_beacon_tim_bdata = 0x4087fe6c ); -PROVIDE( rx_beacon_tim_bdata_bitmapctl = 0x4087fe68 ); -PROVIDE( rx_beacon_tim_bdata_bitmap_trans = 0x4087fe64 ); -PROVIDE( rx_beacon_tim_bdata_bitmap_mbssid_self = 0x4087fe60 ); -PROVIDE( rx_beacon_tim_bdata_bitmap_mbssid_other = 0x4087fe5c ); -PROVIDE( rx_beacon_dtim_tim = 0x4087fe58 ); -PROVIDE( rx_beacon_dtim_tim_mcast = 0x4087fe54 ); -PROVIDE( amdpu_delay_time_ms = 0x4087fd08 ); -PROVIDE( ampdu_delay_packet = 0x4087fd04 ); -PROVIDE( ampdu_delay = 0x4087fe51 ); -PROVIDE( first_ampdu = 0x4087fe50 ); -PROVIDE( s_ht_ampdu_density_us = 0x4087fd02 ); -PROVIDE( s_ht_ampdu_density = 0x4087fd01 ); -PROVIDE( s_running_phy_type = 0x4087fd00 ); -PROVIDE( complete_ena_tb_seqno = 0x4087fe4c ); -PROVIDE( complete_ena_tb_final = 0x4087fe48 ); -PROVIDE( complete_ena_tb_count = 0x4087fe44 ); -PROVIDE( s_itwt_state = 0x4087fe40 ); -PROVIDE( g_dbg_interp_tsf = 0x4087fe3c ); -PROVIDE( g_dbg_interp_tsf_end = 0x4087fe38 ); -PROVIDE( g_dbg_closrf_tsf = 0x4087fe34 ); -PROVIDE( g_dbg_closrf_idx = 0x4087fe30 ); -PROVIDE( g_dbg_closrf_blk = 0x4087fe2c ); -PROVIDE( s_he_min_len_bytes = 0x4087fdf0 ); -PROVIDE( s_he_dcm_min_len_bytes = 0x4087fdd0 ); -PROVIDE( s_mplen_low_bitmap = 0x4087fdc0 ); -PROVIDE( s_mplen_high_bitmap = 0x4087fdb0 ); -PROVIDE( s_mplen_vi_bitmap = 0x4087fdac ); -PROVIDE( s_mplen_bk_bitmap = 0x4087fda8 ); -PROVIDE( esp_wifi_cert_tx_mcs = 0x4087fcfc ); -PROVIDE( esp_wifi_cert_tx_bcc = 0x4087fcf8 ); -PROVIDE( esp_wifi_cert_tx_nss = 0x4087fcec ); -PROVIDE( esp_test_tx_statistics_aci_bitmap = 0x4087fda4 ); -PROVIDE( esp_test_tx_statistics = 0x4087fd94 ); -PROVIDE( esp_test_tx_tb_statistics = 0x4087fd84 ); -PROVIDE( esp_test_tx_fail_statistics = 0x4087fd24 ); -PROVIDE( esp_test_rx_statistics = 0x4087fd1c ); -PROVIDE( esp_test_rx_mu_statistics = 0x4087fd18 ); -PROVIDE( esp_test_mu_print_ru_allocation = 0x4087fd14 ); +pp_sig_cnt_ptr = 0x4087ff5c; +g_eb_list_desc_ptr = 0x4087ff58; +s_fragment_ptr = 0x4087ff54; +if_ctrl_ptr = 0x4087ff50; +g_intr_lock_mux = 0x4087ff4c; +g_wifi_global_lock = 0x4087ff48; +s_wifi_queue = 0x4087ff44; +pp_task_hdl = 0x4087ff40; +s_pp_task_create_sem = 0x4087ff3c; +s_pp_task_del_sem = 0x4087ff38; +g_wifi_menuconfig_ptr = 0x4087ff34; +xphyQueue = 0x4087ff30; +ap_no_lr_ptr = 0x4087ff2c; +rc11BSchedTbl_ptr = 0x4087ff28; +rc11NSchedTbl_ptr = 0x4087ff24; +rcLoRaSchedTbl_ptr = 0x4087ff20; +BasicOFDMSched_ptr = 0x4087ff1c; +trc_ctl_ptr = 0x4087ff18; +g_pm_cnt_ptr = 0x4087ff14; +g_pm_ptr = 0x4087ff10; +g_pm_cfg_ptr = 0x4087ff0c; +g_esp_mesh_quick_funcs_ptr = 0x4087ff08; +g_txop_queue_status_ptr = 0x4087ff04; +g_mac_sleep_en_ptr = 0x4087ff00; +g_mesh_is_root_ptr = 0x4087fefc; +g_mesh_topology_ptr = 0x4087fef8; +g_mesh_init_ps_type_ptr = 0x4087fef4; +g_mesh_is_started_ptr = 0x4087fef0; +g_config_func = 0x4087feec; +g_net80211_tx_func = 0x4087fee8; +g_timer_func = 0x4087fee4; +s_michael_mic_failure_cb = 0x4087fee0; +wifi_sta_rx_probe_req = 0x4087fedc; +g_tx_done_cb_func = 0x4087fed8; +g_per_conn_trc = 0x4087fe8c; +s_encap_amsdu_func = 0x4087fe88; +rx_beacon_count = 0x4087fe84; +rx_beacon_sw_parse = 0x4087fe80; +rx_beacon_hw_parse = 0x4087fe7c; +rx_beacon_tim_count = 0x4087fe78; +rx_beacon_tim_udata = 0x4087fe74; +rx_beacon_tim_udata_bitmap = 0x4087fe70; +rx_beacon_tim_bdata = 0x4087fe6c; +rx_beacon_tim_bdata_bitmapctl = 0x4087fe68; +rx_beacon_tim_bdata_bitmap_trans = 0x4087fe64; +rx_beacon_tim_bdata_bitmap_mbssid_self = 0x4087fe60; +rx_beacon_tim_bdata_bitmap_mbssid_other = 0x4087fe5c; +rx_beacon_dtim_tim = 0x4087fe58; +rx_beacon_dtim_tim_mcast = 0x4087fe54; +amdpu_delay_time_ms = 0x4087fd08; +ampdu_delay_packet = 0x4087fd04; +ampdu_delay = 0x4087fe51; +first_ampdu = 0x4087fe50; +s_ht_ampdu_density_us = 0x4087fd02; +s_ht_ampdu_density = 0x4087fd01; +s_running_phy_type = 0x4087fd00; +complete_ena_tb_seqno = 0x4087fe4c; +complete_ena_tb_final = 0x4087fe48; +complete_ena_tb_count = 0x4087fe44; +s_itwt_state = 0x4087fe40; +g_dbg_interp_tsf = 0x4087fe3c; +g_dbg_interp_tsf_end = 0x4087fe38; +g_dbg_closrf_tsf = 0x4087fe34; +g_dbg_closrf_idx = 0x4087fe30; +g_dbg_closrf_blk = 0x4087fe2c; +s_he_min_len_bytes = 0x4087fdf0; +s_he_dcm_min_len_bytes = 0x4087fdd0; +s_mplen_low_bitmap = 0x4087fdc0; +s_mplen_high_bitmap = 0x4087fdb0; +s_mplen_vi_bitmap = 0x4087fdac; +s_mplen_bk_bitmap = 0x4087fda8; +esp_wifi_cert_tx_mcs = 0x4087fcfc; +esp_wifi_cert_tx_bcc = 0x4087fcf8; +esp_wifi_cert_tx_nss = 0x4087fcec; +esp_test_tx_statistics_aci_bitmap = 0x4087fda4; +esp_test_tx_statistics = 0x4087fd94; +esp_test_tx_tb_statistics = 0x4087fd84; +esp_test_tx_fail_statistics = 0x4087fd24; +esp_test_rx_statistics = 0x4087fd1c; +esp_test_rx_mu_statistics = 0x4087fd18; +esp_test_mu_print_ru_allocation = 0x4087fd14; PROVIDE( sigb_ru_allocation_user_num = 0x4004ffc8 ); PROVIDE( sigb_common_ru_allocation = 0x4004ff38 ); PROVIDE( mu_mimo_special_cfg_user_num_2 = 0x4004fee8 ); @@ -1394,8 +1400,8 @@ PROVIDE( mu_mimo_special_cfg_user_num_5 = 0x4004fdf0 ); PROVIDE( mu_mimo_special_cfg_user_num_6 = 0x4004fdd0 ); PROVIDE( mu_mimo_special_cfg_user_num_7 = 0x4004fdc0 ); PROVIDE( mu_mimo_special_cfg_user_num_8 = 0x4004fdb8 ); -PROVIDE( esp_test_rx_error_occurs = 0x4087fd10 ); -PROVIDE( g_pp_tx_pkt_num = 0x4087fd0c ); +esp_test_rx_error_occurs = 0x4087fd10; +g_pp_tx_pkt_num = 0x4087fd0c; PROVIDE( he_max_apep_length = 0x4004fd40 ); /* --- esp32c6.rom.net80211.ld --- */ @@ -1426,16 +1432,16 @@ PROVIDE( ieee80211_crypto_encap = 0x40000bc0 ); PROVIDE( ieee80211_decap = 0x40000bc8 ); PROVIDE( wifi_is_started = 0x40000bcc ); PROVIDE( ieee80211_gettid = 0x40000bd0 ); -PROVIDE( net80211_funcs = 0x4087ffac ); -PROVIDE( g_scan = 0x4087ffa8 ); -PROVIDE( g_chm = 0x4087ffa4 ); -PROVIDE( g_ic_ptr = 0x4087ffa0 ); -PROVIDE( g_hmac_cnt_ptr = 0x4087ff9c ); -PROVIDE( g_tx_cacheq_ptr = 0x4087ff98 ); -PROVIDE( s_netstack_free = 0x4087ff94 ); -PROVIDE( mesh_rxcb = 0x4087ff90 ); -PROVIDE( sta_rxcb = 0x4087ff8c ); -PROVIDE( g_itwt_fid = 0x4087ff88 ); +net80211_funcs = 0x4087ffac; +g_scan = 0x4087ffa8; +g_chm = 0x4087ffa4; +g_ic_ptr = 0x4087ffa0; +g_hmac_cnt_ptr = 0x4087ff9c; +g_tx_cacheq_ptr = 0x4087ff98; +s_netstack_free = 0x4087ff94; +mesh_rxcb = 0x4087ff90; +sta_rxcb = 0x4087ff8c; +g_itwt_fid = 0x4087ff88; /* --- esp32c6.rom.coexist.ld --- */ PROVIDE( esp_coex_rom_version_get = 0x40000afc ); @@ -1455,12 +1461,12 @@ PROVIDE( coex_schm_lock = 0x40000b38 ); PROVIDE( coex_schm_unlock = 0x40000b3c ); PROVIDE( coex_wifi_release = 0x40000b44 ); PROVIDE( esp_coex_ble_conn_dynamic_prio_get = 0x40000b48 ); -PROVIDE( coex_env_ptr = 0x4087ffc4 ); -PROVIDE( coex_pti_tab_ptr = 0x4087ffc0 ); -PROVIDE( coex_schm_env_ptr = 0x4087ffbc ); -PROVIDE( coexist_funcs = 0x4087ffb8 ); -PROVIDE( g_coa_funcs_p = 0x4087ffb4 ); -PROVIDE( g_coex_param_ptr = 0x4087ffb0 ); +coex_env_ptr = 0x4087ffc4; +coex_pti_tab_ptr = 0x4087ffc0; +coex_schm_env_ptr = 0x4087ffbc; +coexist_funcs = 0x4087ffb8; +g_coa_funcs_p = 0x4087ffb4; +g_coex_param_ptr = 0x4087ffb0; /* --- esp32c6.rom.version.ld --- */ PROVIDE( _rom_chip_id = 0x40000010 ); @@ -1481,4 +1487,4 @@ PROVIDE( strchr = 0x40000534 ); PROVIDE( strlcpy = 0x40000544 ); PROVIDE( strstr = 0x400004cc ); PROVIDE( strcasecmp = 0x40000524 ); -PROVIDE( syscall_table_ptr = 0x4087ffd4 ); +syscall_table_ptr = 0x4087ffd4;