Skip to content

Commit

Permalink
chore(meson): update to meson 1.2.2
Browse files Browse the repository at this point in the history
Fix any new warnings that arise
  • Loading branch information
hashemmm96 committed Oct 3, 2023
1 parent 3f570bc commit f226024
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 54 deletions.
3 changes: 1 addition & 2 deletions apps/battery-monitor/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ battery_monitor_elf = executable(
[common_libs_src, battery_monitor_src],
include_directories: [common_libs_inc, battery_monitor_inc],
link_depends: app_linker_script,
link_args: ['-T@0@'.format(app_linker_script)],
link_args: ['-T@0@'.format(app_linker_script.full_path())],
)

battery_monitor_bin = custom_target(
'battery-monitor.bin',
output: 'battery-monitor.bin',
input: battery_monitor_elf,
command: [objcopy, '-O', 'binary', '-S', '@INPUT@', '@OUTPUT@'],
Expand Down
20 changes: 0 additions & 20 deletions apps/battery-monitor/src/peripherals.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ void peripherals_init(void) {
i2c1_init();
}

/**
* @brief ADC1 Initialization Function
* @param None
* @retval None
*/
void adc1_init(void) {
ADC_MultiModeTypeDef multimode;
ADC_ChannelConfTypeDef config;
Expand Down Expand Up @@ -109,11 +104,6 @@ void adc1_init(void) {
}
}

/**
* @brief ADC2 Initialization Function
* @param None
* @retval None
*/
void adc2_init(void) {
ADC_ChannelConfTypeDef config;

Expand Down Expand Up @@ -179,11 +169,6 @@ void adc2_init(void) {
}
}

/**
* @brief I2C1 Initialization Function
* @param None
* @retval None
*/
void i2c1_init(void) {
I2C_HandleTypeDef* hi2c1 = &peripherals.hi2c1;
hi2c1->Instance = I2C1;
Expand Down Expand Up @@ -229,11 +214,6 @@ void dma_init(void) {
HAL_NVIC_EnableIRQ(DMA2_Channel1_IRQn);
}

/**
* @brief GPIO Initialization Function
* @param None
* @retval None
*/
void gpio_init(void) {
GPIO_InitTypeDef gpio_init;

Expand Down
3 changes: 1 addition & 2 deletions apps/joystick/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ joystick_elf = executable(
[common_libs_src, joystick_src],
include_directories: [common_libs_inc, joystick_inc],
link_depends: app_linker_script,
link_args: ['-T@0@'.format(app_linker_script)],
link_args: ['-T@0@'.format(app_linker_script.full_path())],
)

joystick_bin = custom_target(
'joystick.bin',
output: 'joystick.bin',
input: joystick_elf,
command: [objcopy, '-O', 'binary', '-S', '@INPUT@', '@OUTPUT@'],
Expand Down
3 changes: 1 addition & 2 deletions apps/sbus-receiver/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ sbus_receiver_elf = executable(
[common_libs_src, sbus_receiver_src],
include_directories: [common_libs_inc, sbus_receiver_inc],
link_depends: app_linker_script,
link_args: ['-T@0@'.format(app_linker_script)],
link_args: ['-T@0@'.format(app_linker_script.full_path())],
)

sbus_receiver_bin = custom_target(
'sbus-receiver.bin',
output: 'sbus-receiver.bin',
input: sbus_receiver_elf,
command: [objcopy, '-O', 'binary', '-S', '@INPUT@', '@OUTPUT@'],
Expand Down
6 changes: 0 additions & 6 deletions apps/servo/include/adc.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ extern "C" {

#include <stdint.h>

/*******************************************************
* Convert ADC reading to a sensor power CAN message.
*
* @param adc_value The raw ADC reading.
* @param frame CAN frame populated by the function.
******************************************************/
uint16_t adc_to_sensor_power(uint16_t adc_value);
uint16_t adc_to_servo_current(uint16_t adc_value);
uint16_t adc_to_battery_voltage(uint16_t adc_value);
Expand Down
6 changes: 2 additions & 4 deletions apps/servo/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ servo_elf = executable(
[common_libs_src, servo_src],
include_directories: [common_libs_inc, servo_inc],
link_depends: app_linker_script,
link_args: ['-T@0@'.format(app_linker_script)],
link_args: ['-T@0@'.format(app_linker_script.full_path())],
)

servo_bin = custom_target(
'servo.bin',
output: 'servo.bin',
input: servo_elf,
command: [objcopy, '-O', 'binary', '-S', '@INPUT@', '@OUTPUT@'],
Expand All @@ -33,12 +32,11 @@ motor_elf = executable(
[common_libs_src, servo_src],
include_directories: [common_libs_inc, servo_inc],
link_depends: app_linker_script,
link_args: ['-T@0@'.format(app_linker_script)],
link_args: ['-T@0@'.format(app_linker_script.full_path())],
c_args: ['-DMOTOR'],
)

motor_bin = custom_target(
'motor.bin',
output: 'motor.bin',
input: motor_elf,
command: [objcopy, '-O', 'binary', '-S', '@INPUT@', '@OUTPUT@'],
Expand Down
21 changes: 7 additions & 14 deletions bootloader/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,29 @@ bootloader_src = files(
'src' / 'main.c',
)

app_linker_script = configure_file(
copy: true,
input: files('src' / 'app.ld'),
output: '@PLAINNAME@',
)
fs = import('fs')

bootloader_linker_script = configure_file(
copy: true,
input: files('src' / 'bootloader.ld'),
output: '@PLAINNAME@',
)
app_linker_script = fs.copyfile(files('src' / 'app.ld'))

bootloader_linker_script = fs.copyfile(files('src' / 'bootloader.ld'))

bootloader_elf = executable(
'bootloader.elf',
[bootloader_src, common_libs_src],
include_directories: [bootloader_inc, common_libs_inc],
link_depends: bootloader_linker_script,
link_args: ['-T@0@'.format(bootloader_linker_script)],
link_args: ['-T@0@'.format(bootloader_linker_script.full_path())],
)

bootloader_bin = custom_target(
'bootloader.bin',
output: 'bootloader.bin',
input: bootloader_elf,
command: [
objcopy,
'-S',
'-O', 'binary',
'--pad-to=0x08010000', # Flash base + 64KB
'--gap-fill=0xFF', # Flash erase value
'--pad-to', '0x08010000', # Flash base + 64KB
'--gap-fill', '0xFF', # Flash erase value
'@INPUT@',
'@OUTPUT@',
],
Expand Down
1 change: 1 addition & 0 deletions docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ GENERATE_HTML = NO
GENERATE_LATEX = NO
GENERATE_XML = YES
HAVE_DOT = NO
WARN_IF_UNDOCUMENTED = NO
2 changes: 1 addition & 1 deletion libs/can-kingdom/include/king.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ ck_err_t ck_create_kings_page_2(const ck_kp2_args_t *args, ck_page_t *page);
* KP8 is used to set the CAN bit timing settings for a city.
*
* @param address city or group address.
* @param args ck_can_bit_timing_t with the desired values.
* @param bit_timing ck_can_bit_timing_t with the desired values.
* @param page will be populated with the created king's page.
*
* @return #CK_ERR_INCOMPATIBLE_PARAMS if some of the args are incompatible.
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project(
'Rover',
'c',
meson_version: '==0.61.2',
meson_version: '>=1.2.0',
version: '0.1',
default_options: [
'buildtype=debugoptimized',
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ idna==3.4
imagesize==1.4.1
Jinja2==3.1.2
MarkupSafe==2.1.3
meson==0.61.2
meson==1.2.2
mypy-extensions==1.0.0
ninja==1.10.0
ninja==1.11.1
packaging==23.1
pathspec==0.11.2
platformdirs==3.10.0
Expand Down

0 comments on commit f226024

Please sign in to comment.