How to use GENERATED from SELECT with JOIN?
According to the MySQL documentation, GENERATED columns cannot have subqueries:

Generated column expressions must adhere to the following rules. An error occurs if an expression contains disallowed constructs.

Literals, deterministic built-in functions, and operators are permitted. A function is deterministic if, given the same data in tables, multiple invocations produce the same result, independently of the connected user. Examples of functions that fail this definition: CONNECTION_ID(), CURRENT_USER(), NOW().

Subqueries, parameters, variables, stored functions, and user-defined functions are not permitted.

...




What you could do, is use a view:
CREATE VIEW DietDB.Servings_All        -- pick an appropriate name
AS 
SELECT s.*,
       CAST((fi.kcal * s.units) / 100 AS UNSIGNED INT) AS kcal 
FROM DietDB.Servings AS s 
  LEFT JOIN DietDB.FoodItems AS fi 
    ON s.FoodItem_id = fi.id ;