Browse Source

* make warning on unsupported esp-idf version a warning string so it can be translated

florian 1 year ago
parent
commit
437e7fa75a
2 changed files with 6 additions and 3 deletions
  1. 3 0
      compiler/msg/errore.msg
  2. 3 3
      compiler/pmodules.pas

+ 3 - 0
compiler/msg/errore.msg

@@ -3513,6 +3513,9 @@ unit_u_ppu_symansistr_mismatch=10069_U_Skipping unit, PPU and compiler have to b
 unit_u_ppu_wasm_threads_mismatch=10070_U_PPU and program must both be compiled with or without WebAssembly multithreading support
 % The user is compiling a program with multithreading turned on, but the unit was compiled with multithreading off,
 % or vice versa.
+unit_w_unsupported_esp_idf_version=10071_W_Unsupported esp-idf version
+% FPC supports only certain ESP-IDF versions. It is very unlikely that the resulting program works if this
+% warning is thrown.
 % \end{description}
 # EndOfTeX
 

+ 3 - 3
compiler/pmodules.pas

@@ -524,7 +524,7 @@ implementation
               else if idf_version>=50200 then
                 CheckAddUnit('espidf_50200')
               else
-                Comment(V_Warning, 'Unsupported esp-idf version');
+                Message(unit_w_unsupported_esp_idf_version);
             end
           else if (current_settings.controllertype=ct_esp8266) then
             begin
@@ -533,7 +533,7 @@ implementation
               else if idf_version>=30400 then
                 CheckAddUnit('esp8266rtos_30400')
               else
-                Comment(V_Warning, 'Unsupported esp-rtos version');
+                Message(unit_w_unsupported_esp_idf_version);
             end;
 {$endif XTENSA}
 {$ifdef RISCV32}
@@ -558,7 +558,7 @@ implementation
               else if idf_version>=40400 then
                 CheckAddUnit('esp32c3idf_40400')
               else
-                Comment(V_Warning, 'Unsupported esp-idf version');
+                Message(unit_w_unsupported_esp_idf_version);
             end;
           if (current_settings.controllertype=ct_esp32c6) then
             begin