#v2.10
# --------------------------------------------------------------------------
#  MPLAB XC32 Compiler -  XC32 specs file for PIC32CM5164JH01032
#  
#  Copyright (c) 2026 Microchip Technology Inc. and its subsidiaries.
#
#  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.
# --------------------------------------------------------------------------
#
# See <https://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html>
# for a documentation of spec files.
#
# If you intend to use an existing device specs file as a starting point
# for a new device spec file, make sure you are copying from a specs
# file for a device from the same core architecture and SP width.
# See <https://gcc.gnu.org/gcc-6/changes.html> for a description
# of how to use such own spec files.

*pic32clibc_startfile:
	crti%O%s crtbegin%O%s crt0%O%s 

*pic32c_lib:
	--start-group -lpic32c %G %L --end-group 

*pic32clibc_devicelib:
	%{!nodevicelib:-lPIC32CM5164JH01032} 

*cpp:
	%{mfloat-abi=soft: %{mfloat-abi=hard: %e-mfloat-abi=soft and -mfloat-abi=hard may not be used together}} 

*default_mode:
        %{!marm: -mthumb } 

*default_fpu:
        -mfloat-abi=soft 

*cc1_inst_set:
        %(default_mode) 

*cc1_device:
	-D__32CM5164JH01032__ 

*cc1_fpu_device:
        %(default_fpu) 

*cc1_debug:
	%{D__DEBUG : -mdebugger }

*cc1_save_temps:
	%{save-temps: -fverbose-asm }

*cc1_smartio:
	%{msmart-io: %{msmart-io=*: %emay not use both -msmart-io and -msmart-io=LEVEL}} %{mno-smart-io:%{msmart-io=*:%emay not use both -mno-smart-io and -msmart-io=LEVEL}} 

*cc1_config_data:
	-mconfig-data-file=%{mdfp=*:%*/xc32/PIC32CM5164JH01032/configuration.data ;:%R/lib/proc/PIC32CM5164JH01032/configuration.data } 

*asm_arch:
	%{mcpu=*: -mcpu=%* ;: -mcpu=cortex-m0plus }

*asm_float:
	%{mapcs-float: -mfloat }

*endianness:
        %{mbig-endian: -EB ;: -EL }

*linker_script:
	 %{!T: %{mdfp=*: -T %*/xc32/PIC32CM5164JH01032/PIC32CM5164JH01032.ld ;: -T %R/lib/proc/PIC32CM5164JH01032/PIC32CM5164JH01032.ld } }

*linker_smartio:
	%{mno-smart-io:--no-smart-io} %{msmart-io=0:--no-smart-io} 

*self_spec:
	%{mcpu=*: -mcpu=%* ;: -mcpu=cortex-m0plus } %(default_mode) %{!flto : -fno-lto } %(default_fpu) %(cc1_device) %{mdfp=*: -isystem %*/xc32/include } %{!minclude-legacy-headers: %{mdfp=*: -isystem %*/include_mcc } } %{mdfp=*: -isystem %*/include }   %{mitcm*|mdtcm*|mtcm*: %ethe -mitcm,-mdtcm,-mtcm options are not supported on this device.;: } %{!c: %{!S: %{!E: %{!mno-device-startup-code: %{mdfp=* :%*/xc32/PIC32CM5164JH01032/startup_pic32cm5164jh01032.c ;: %R/lib/proc/PIC32CM5164JH01032/startup_pic32cm5164jh01032.c } } } } }  

# End of file
