浏览代码

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

florian 1 年之前
父节点
当前提交
437e7fa75a
共有 2 个文件被更改,包括 6 次插入3 次删除
  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