@@ -171,13 +171,12 @@ fn run() -> Result<()> {
171
171
. action ( ArgAction :: SetTrue )
172
172
. help ( "Make advanced checks due to parsing SVD" ) ,
173
173
)
174
- // TODO: deprecate
175
174
. arg (
176
175
Arg :: new ( "pascal_enum_values" )
177
176
. long ( "pascal-enum-values" )
178
177
. alias ( "pascal_enum_values" )
179
178
. action ( ArgAction :: SetTrue )
180
- . help ( "Use PascalCase in stead of CONSTANT_CASE for enumerated values" ) ,
179
+ . help ( "Use PascalCase in stead of UPPER_CASE for enumerated values" ) ,
181
180
)
182
181
. arg (
183
182
Arg :: new ( "source_type" )
@@ -199,6 +198,17 @@ fn run() -> Result<()> {
199
198
. action ( ArgAction :: SetTrue )
200
199
. help ( "Reexport interrupt macro from cortex-m-rt like crates" ) ,
201
200
)
201
+ . arg (
202
+ Arg :: new ( "base_address_shift" )
203
+ . short ( 'b' )
204
+ . long ( "base-address-shift" )
205
+ . alias ( "base_address_shift" )
206
+ . action ( ArgAction :: Set )
207
+ . help ( "Add offset to all base addresses on all peripherals in the SVD file." )
208
+ . long_help ( "Add offset to all base addresses on all peripherals in the SVD file.
209
+ Useful for soft-cores where the peripheral address range isn't necessarily fixed.
210
+ Ignore this option if you are not building your own FPGA based soft-cores." ) ,
211
+ )
202
212
. arg (
203
213
Arg :: new ( "log_level" )
204
214
. long ( "log" )
@@ -249,9 +259,6 @@ fn run() -> Result<()> {
249
259
config. source_type = SourceType :: from_path ( file)
250
260
}
251
261
let path = config. output_dir . as_deref ( ) . unwrap_or ( Path :: new ( "." ) ) ;
252
- if config. pascal_enum_values {
253
- config. ident_formats . enum_value . case = Some ( svd2rust:: config:: Case :: Pascal ) ;
254
- }
255
262
256
263
info ! ( "Parsing device from SVD file" ) ;
257
264
let device = load_from ( input, & config) ?;
0 commit comments